-
Notifications
You must be signed in to change notification settings - Fork 0
jimtyhurst/nim
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# nim Nim is a game played by two people, who take turns selecting tokens from a board. The player who picks up the last token wins. This implementation was written as an exercise while learning Clojure. ## Usage In a repl: (use '[nim.ctl] :reload) (start-game) ;Initializes board to default preferences. (take-tokens number-of-tokens) ;Player takes a turn by taking number-of-tokens (machine-takes-turn) ;The application makes a choice for the current turn. Note: machine-takes-turn does an exhaustive look-ahead, evaluating all possible moves. So it selects the next move that maximizes the ratio of winning end conditions over all possible end conditions. ## License Copyright (c) 2011 Jim Tyhurst Distributed under the Eclipse Public License, the same as Clojure.
About
Clojure application to play the game of Nim.
Topics
Resources
Stars
Watchers
Forks
Packages 0
No packages published