This is a front end spectator for my Clojure Tic Tac Toe.
A user can watch an ongoing game in their browser.
- Install Java
- Install Homebrew by running
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install Clojure by
running
$ brew install clojure
- Install Leiningen by running
$ brew install leiningen
- Download and install NodeJS
- Clone the Clojure Tic Tac Toe repository by clicking on the green "Clone or Download" button
- Select Download Zip
- Double click the zip file to unzip it
- In terminal, CD into the repository
- Create an AWS account
- Set the following Environment Variables. I use
EnvPane.
AWS_ACCOUNT_ID
,AWS_ACCESS_KEY_ID
andAWS_SECRET_KEY
. - Run the app with
$ lein run
- Choose Player
- Clone this repository by clicking on the green "Clone or Download" button
- Select Download Zip
- Double click the zip file to unzip it
- In a new terminal window, CD into the repository
- Set the following Environment Variable. I use
EnvPane.
AWS_REGION
. - Run the app with
$ npm run watch
- In a browser, navigate to
localhost:8080
- Play the game in the Clojure window - the moves will appear in the browser window
The rules of tic-tac-toe are as follows:
- There are two players in the game (X and O)
- Players take turns until the game is over
- A player can claim a field if it is not already taken
- A turn ends when a player claims a field
- A player wins if they claim all the fields in a row, column or diagonal
- A game is over if a player wins
- A game is over when all fields are taken