https://github.com/franckverrot/tictactoe-elm
Tic Tac Toe with Elm
https://github.com/franckverrot/tictactoe-elm
elm elm-css elm-demos elm-test game tic-tac-toe
Last synced: about 1 month ago
JSON representation
Tic Tac Toe with Elm
- Host: GitHub
- URL: https://github.com/franckverrot/tictactoe-elm
- Owner: franckverrot
- Created: 2017-02-03T08:13:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-26T18:11:06.000Z (over 8 years ago)
- Last Synced: 2025-04-27T11:02:53.972Z (6 months ago)
- Topics: elm, elm-css, elm-demos, elm-test, game, tic-tac-toe
- Language: JavaScript
- Homepage: http://franck.verrot.fr/tictactoe-elm/
- Size: 93.8 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tic Tac Toe in Elm
Demo URL: http://franck.verrot.fr/tictactoe-elm/
## Notes
(from the initial commit [023baa8](https://github.com/franckverrot/tictactoe-elm/commit/023baa8dcf95aba3399a8d3fae8adb4b9636b654))
```
The most interesting part was to find how to emit a custom command by
piggybacking it on `Time.now`.There are three events in this app:
1. `Reset`
Resets the game to its initial state
2. `BoxClicked box index`
Claim a box for a specific user, triggers `CheckWinner` when it's done
3. `CheckWinner player currentPlayerShouldChange time`
Checks for stalemate or a winner
```## Setup
1. `npm install elm` : downloads Elm
2. `make get-deps` : downloads packages
3. `make` : runs tests and compiles down to a single JavaScript file
4. `make test` : runs tests only