Non-transitive dice: Difference between revisions
m
Minor changes.
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (Minor changes.) |
||
Line 1,206:
{{libheader|itertools}}
<syntaxhighlight lang="nim">
import std/[algorithm, sequtils, sets, strformat]
import itertools
Line 1,224:
func cmp(die1, die2: Die): int =
## Compare two
var tot: array[3, int]
for d in product(die1.faces, die2.faces):
Line 1,232:
func verboseCmp(die1, die2: Die): string =
## Compare
var win1, win2 = 0
for (d1, d2) in product(die1.faces, die2.faces):
|