From 8973f4b0d03ee949f562137f12d508c98ead1fc0 Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Mon, 8 Apr 2019 15:26:21 -0500 Subject: [PATCH] Off by one on the rolls --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 305cfaa..02c2336 100644 --- a/main.go +++ b/main.go @@ -58,7 +58,7 @@ func parseParm(p string) (int, int, int) { func roll(num, sides int) int { ret := 0 for ; num > 0; num-- { - ret += r.Intn(sides) + ret += r.Intn(sides) + 1 } return ret }