mirror of
https://gitlab.com/EternalWanderer/dice-roller.git
synced 2024-11-28 21:03:51 +01:00
Cleanup
This commit is contained in:
parent
a4fc869497
commit
1d638fa4bd
12
main.go
12
main.go
|
@ -31,10 +31,10 @@ func main() {
|
||||||
case attacks > 1:
|
case attacks > 1:
|
||||||
for i := 0; i < attacks; i++ {
|
for i := 0; i < attacks; i++ {
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
Cast(surfaces, diceThrows, modifier)
|
Cast(surfaces, diceThrows)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
Cast(surfaces, diceThrows, modifier)
|
Cast(surfaces, diceThrows)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ func ParseFlags() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
}
|
}
|
||||||
|
|
||||||
func Cast(dieSurfaces, castAmount, modifier int) {
|
func Cast(dieSurfaces, castAmount int) {
|
||||||
var (
|
var (
|
||||||
casts []int
|
casts []int
|
||||||
cast, total int
|
cast, total int
|
||||||
|
@ -75,7 +75,11 @@ func Cast(dieSurfaces, castAmount, modifier int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func SimpleCast() 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 {
|
func Advantage(x, y int) int {
|
||||||
|
|
Loading…
Reference in a new issue