Nim game: Difference between revisions

39 bytes removed ,  10 months ago
m
(Added Z80 Assembly version)
Line 744:
 
==={{header|Craft Basic}}===
<syntaxhighlight lang="basic">titlelet "NIM"h = 12
 
bgcolor 0,180,0
cls
wait
 
let h = 12
 
label loop
 
printalert "There are ", h ," tokens remaining."
input "How many would you like to take? ", t
 
if t > 3 or t < 1 then
 
printalert "You must take between 1 to 3 tokens."
 
endif
Line 765 ⟶ 759:
if h - t < 0 then
 
printalert "You cannot take that many. There's only ", h ," left."
 
endif
Line 794 ⟶ 788:
endif
 
printalert "I will take ", t ," tokens."
let h = h - t
 
305

edits