This commit is contained in:
Nox Sluijtman 2022-07-29 11:24:46 +02:00
parent a4fc869497
commit 1d638fa4bd

12
main.go
View file

@ -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 {