mirror of
https://gitlab.com/EternalWanderer/dice-roller.git
synced 2024-11-29 05:13:50 +01:00
Yet more string foermatting
This commit is contained in:
parent
349f882ade
commit
852bd4c906
11
main.go
11
main.go
|
@ -47,11 +47,6 @@ func main() {
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
||||||
if diceThrows <= 1 {
|
|
||||||
fmt.Println(string(ColorYellow), "Rolling die...:", string(ColorReset))
|
|
||||||
} else{
|
|
||||||
fmt.Println(string(ColorYellow), "Rolling",diceThrows,"dice...:", string(ColorReset))
|
|
||||||
}
|
|
||||||
Cast(surfaces, diceThrows)
|
Cast(surfaces, diceThrows)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,6 +86,12 @@ func Cast(dieSurfaces, castAmount int) {
|
||||||
fmt.Println(string(ColorBlue), "\tIndividual rolls:", casts, string(ColorReset))
|
fmt.Println(string(ColorBlue), "\tIndividual rolls:", casts, string(ColorReset))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if modifier != 0 {
|
||||||
|
fmt.Printf("%sRolling %dd%d + %d...\n%s", ColorYellow, diceThrows, surfaces, modifier, ColorReset)
|
||||||
|
} else {
|
||||||
|
fmt.Printf("%sRolling %dd%d...\n%s", ColorYellow, diceThrows, surfaces, ColorReset)
|
||||||
|
}
|
||||||
|
|
||||||
if modifier != 0 {
|
if modifier != 0 {
|
||||||
fmt.Println("\tWithout modifier:", total)
|
fmt.Println("\tWithout modifier:", total)
|
||||||
fmt.Println(string(ColorGreen), "\tWith modifier:", total+modifier, string(ColorReset))
|
fmt.Println(string(ColorGreen), "\tWith modifier:", total+modifier, string(ColorReset))
|
||||||
|
|
Loading…
Reference in a new issue