TicTacToe Sample Project
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Pods
TicTacToe
highscoreserver
tictactoe.xcworkspace
.codeclimate.yml
.gitignore
.swiftlint.yml
.tailor.yml
.travis.yml
Podfile
Podfile.lock
README.md

README.md

Travis Build Status Bitrise Build Status Code Climate codebeat badge

TicTacToe

[TicTacToe

An implementation of TicTacToe, in which the iphone client talks to a server API to retrieve / update highscore. Server is located at http://127.0.0.1:8090 and supports 4 types of request:

- GET /highscore.<html/json>: to provide a html/json formatted list of current highscore
- POST /highscore.json: to update highscore with a new entry

Post request has 3 elements: name, moves necessary to win and time needed e.g. {"name": "RED", "moves":5,"time": 0.6193609237670898}.

To play the game just build & run. Xcode project is configured to start server automatically. Server's presence can be verified with http://127.0.0.1:8090/highscore.html in a browser. Posts can be verified via

curl --header "Content-Type: application/json" --request POST -d '{"name": "RED", "moves":5,"time": 0.6193609237670898}' http://127.0.0.1:8090/highscore.json