From 1d638fa4bd7541b944b8654dda77160eadced8c7 Mon Sep 17 00:00:00 2001 From: Azathoth Date: Fri, 29 Jul 2022 11:24:46 +0200 Subject: [PATCH] Cleanup --- main.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index d58ee9a..c3b35c8 100644 --- a/main.go +++ b/main.go @@ -31,10 +31,10 @@ func main() { case attacks > 1: for i := 0; i < attacks; i++ { fmt.Println() - Cast(surfaces, diceThrows, modifier) + Cast(surfaces, diceThrows) } default: - Cast(surfaces, diceThrows, modifier) + Cast(surfaces, diceThrows) } } @@ -50,7 +50,7 @@ func ParseFlags() { flag.Parse() } -func Cast(dieSurfaces, castAmount, modifier int) { +func Cast(dieSurfaces, castAmount int) { var ( casts []int cast, total int @@ -75,7 +75,11 @@ func Cast(dieSurfaces, castAmount, modifier int) { } func SimpleCast() int { - return rand.Intn(20) + 1 + + var cast = rand.Intn(20) + 1 + + fmt.Println("Without modifier:", cast) + return cast + modifier } func Advantage(x, y int) int {