TicTacToe game written in Clojure, running on the command line with keyboard input for each player (no AI for a computer player yet).
This project is from theTicTacToe game from Practicalli Clojure (work in progress)
The current game solution has not been written using TDD, so is put on a branch called solution-no-tests
.
To use the current version of the game, checkout this branch first
git checkout solution-no-tests
The game can be played in the command line by starting a REPL from the root of the project (where project.clj file is)
lein repl
Once the repl prompt is displayed, start the game by including the game namespace
(require 'tictactoe-cli.core)
The current game board will be displayed, followed by a prompt for the next move. Each time a move is made, the new game board will be displayed, along with a prompt for the next move.
You can play the game in Spacemacs / Emacs too, using the mini-buffer as the command line prompt (Stdin).
Start the REPL using cider-jack-in
(, '
) and open the REPL buffer (, s s
).
Change the REPL to the tictactoe-cli.core
namespace, (, s n
).
Evaluate the buffer to start the game, (, e b
).
Enter the next move value in the mini-buffer (not the REPL window) when you see the Stdin
prompt.
Copyright © 2018 Practicalli
Distributed under the Creative Commons Attribution Share-Alike 4.0 International.