Anonymous user
Nim game: Difference between revisions
add comments to Smalltalk
(add comments to Smalltalk) |
|||
Line 1,142:
| take |
<category: 'gameplay'>
take := tokens - (4 * (tokens // 4)). "tokens % 4"
Transcript nextPutAll: 'Computer takes '.
take printOn: Transcript.
Line 1,155:
tokens printOn: Transcript.
Transcript nextPutAll: ' tokens';nl;nl.
1 to:
self pTurn.
self printRemaining.
|