bored-games / canoe-game

:canoe: A tic-tac-toe like two-player strategy game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ›Ά Canoe πŸ›Ά

A tic-tac-toe like two-player strategy game.

Objective

Players take turns placing colored pegs into available holes, one at a time. The first to complete two completed "canoes" wins. A "canoe" is formed by four pegs in this configuration (or any rotation). The two canoes may not share any pegs.

Horizontal Vertical
βšͺ βšͺ βšͺ βšͺ βšͺ βšͺ βšͺ βšͺ βšͺ πŸ”΄ βšͺ βšͺ
βšͺ πŸ”΄ βšͺ βšͺ πŸ”΄ βšͺ βšͺ βšͺ πŸ”΄ βšͺ βšͺ βšͺ
βšͺ βšͺ πŸ”΄ πŸ”΄ βšͺ βšͺ βšͺ βšͺ πŸ”΄ βšͺ βšͺ βšͺ
βšͺ βšͺ βšͺ βšͺ βšͺ βšͺ βšͺ βšͺ βšͺ πŸ”΄ βšͺ βšͺ

Default board layout

The only available board is based on the original design by Dale Walton.

Compiling

Compile changes into javascript and run the Elm reactor server with elm make src/Canoe.elm --output=assets/js/main.js && elm reactor

JSON Codes

Backend -> Frontend

"action" "content" Description
connect_to_server "" Server has connected. Respond with a request to create a user.

To be continued

Frontend -> Backend

"action" "content" Description
submit_move {"team": 1, "pos": {"x": x, "y": y} Submit list of moves
create_user "" Add user
update_user {"username": "User", "color": "#faefa0", "score": 5, "is_admin": true, "is_muted": false} Update user
update_chat {"user": <User>, "msg": "Hello!", "kind": 0} Send chat message
ping "ping" Send "ping" every 50 seconds to maintain the connection.

About

:canoe: A tic-tac-toe like two-player strategy game

License:GNU General Public License v3.0


Languages

Language:Elm 66.9%Language:CSS 30.0%Language:HTML 3.1%