Jump to content

Nim game: Difference between revisions

487 bytes added ,  11 months ago
Line 1,681:
 
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}}==
2,044

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.