From af7935ce467335b8eeeb28f8b153cf6030ae2b76 Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Fri, 29 Jul 2022 12:57:56 +0200 Subject: [PATCH] More string formatting --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 3edfd2c..010c5a9 100644 --- a/main.go +++ b/main.go @@ -47,7 +47,11 @@ func main() { } default: - fmt.Println(string(ColorYellow), "Rolling dice...:", string(ColorReset)) + if diceThrows <= 1 { + fmt.Println(string(ColorYellow), "Rolling die...:", string(ColorReset)) + } else{ + fmt.Println(string(ColorYellow), "Rolling",diceThrows,"dice...:", string(ColorReset)) + } Cast(surfaces, diceThrows) } }