diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2017-02-19 19:23:42 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2017-02-19 19:23:42 +0100 |
| commit | 853c85df02d774961bee33351e14b8e818a7aa56 (patch) | |
| tree | 4b7bd4d3ceb7b6394c32a0623e0097c8a3ef3f1d | |
| parent | 7fdbc971afac5831d8c31295000af38d56021f51 (diff) | |
| download | goffel-853c85df02d774961bee33351e14b8e818a7aa56.tar.gz goffel-853c85df02d774961bee33351e14b8e818a7aa56.zip | |
cmd: dices -> dice
| -rw-r--r-- | logic/cmd.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/logic/cmd.go b/logic/cmd.go index dd65a1b..c1a86ac 100644 --- a/logic/cmd.go +++ b/logic/cmd.go @@ -17,7 +17,7 @@ type Cmd struct { } var cmdTable = map[string]int{ - "d": 1, "dices": 1, + "d": 1, "dice": 1, "p": 2, "print": 2, "q": 3, "quit": 3, "h": 4, "help": 4, @@ -39,7 +39,7 @@ func ParseCmd(s string) (Cmd, error) { argc := 0 switch split[0] { - case "d", "dices": + case "d", "dice": fallthrough case "p", "print": fallthrough @@ -105,8 +105,8 @@ func CmdHelp(cmd int) []string { s := make([]string, 0, 6) switch cmd { case 1: - s = append(s, fmt.Sprint("d - print dices")) - s = append(s, fmt.Sprint("Print out the dices")) + s = append(s, fmt.Sprint("d - print dice")) + s = append(s, fmt.Sprint("Print out the dice")) case 2: s = append(s, fmt.Sprint("p - print score")) s = append(s, fmt.Sprint("Print out your score")) @@ -118,19 +118,19 @@ func CmdHelp(cmd int) []string { s = append(s, fmt.Sprint("Print the help for a specific command or gernal help.")) case 5: s = append(s, fmt.Sprint("i [pos] - insert into score")) - s = append(s, fmt.Sprint("Insert your current dices into your score.")) + s = append(s, fmt.Sprint("Insert your current dice into your score.")) s = append(s, fmt.Sprint("See \"h pos\" for a explenation of the score entries")) case 6: s = append(s, fmt.Sprint("c [pos] - cancel a entry")) s = append(s, fmt.Sprint("Write 0 into your score.")) s = append(s, fmt.Sprint("See \"h pos\" for a explenation of the score entries")) case 7: - s = append(s, fmt.Sprint("r [dices] - reroll some dices")) - s = append(s, fmt.Sprint("Reroll the specified dices.")) - s = append(s, fmt.Sprint("The dices to reroll are represented by a list of their indices in the dice set.")) + s = append(s, fmt.Sprint("r [dice] - reroll some dice")) + s = append(s, fmt.Sprint("Reroll the specified dice.")) + s = append(s, fmt.Sprint("The dice to reroll are represented by a list of their indices in the dice set.")) s = append(s, fmt.Sprint("Example:")) s = append(s, fmt.Sprint("\t\"r 1 4 5\" rerolls dice number 1, 4 and 5")) - s = append(s, fmt.Sprint("\t\"r\" rerolls all dices")) + s = append(s, fmt.Sprint("\t\"r\" rerolls all dice")) case 8: s = append(s, fmt.Sprint("Positions:")) s = append(s, fmt.Sprint("1: Aces")) @@ -149,10 +149,10 @@ func CmdHelp(cmd int) []string { default: s = append(s, fmt.Sprint("h [cmd] - print help")) s = append(s, fmt.Sprint("p - print score")) - s = append(s, fmt.Sprint("d - print dices")) + s = append(s, fmt.Sprint("d - print dice")) s = append(s, fmt.Sprint("q - quit the game")) s = append(s, fmt.Sprint("i [pos] - insert into score")) - s = append(s, fmt.Sprint("r [dices] - reroll some dices")) + s = append(s, fmt.Sprint("r [dice] - reroll some dice")) s = append(s, fmt.Sprint("c [pos] - cancel a entry")) } return s |
