Non-transitive dice: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (→{{header|Wren}}: Minor tidy) |
||
(One intermediate revision by one other user not shown) | |||
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):
Line 2,221:
=={{header|Wren}}==
{{libheader|Wren-sort}}
<syntaxhighlight lang="
var fourFaceCombs = Fn.new {
|