Nim game: Difference between revisions
Content added Content deleted
Basicgames (talk | contribs) |
|||
Line 1,681: | Line 1,681: | ||
print("I win again.")</syntaxhighlight> |
print("I win again.")</syntaxhighlight> |
||
=={{header|EasyLang}}== |
|||
[Run it] |
|||
{{Trans|BASIC256}} |
|||
<syntaxhighlight lang="easylang"> |
|||
token = 12 |
|||
while token > 0 |
|||
repeat |
|||
print "There are " & token & " tokens remaining." |
|||
write "How many would you like to take? (1,2 or 3) " |
|||
h = number input |
|||
print h |
|||
until h >= 1 and h <= 3 |
|||
. |
|||
sleep 1 |
|||
print "On my turn I will take " & 4 - h & " token(s)." |
|||
print "" |
|||
token -= 4 |
|||
. |
|||
print "I got the last token. I win! Better luck next time." |
|||
</syntaxhighlight> |
|||
=={{header|Factor}}== |
=={{header|Factor}}== |