Gomoku written in Go (#riteOfPassage).
Gomoku is a game of Japanese origin, played on a Go board with black and white pieces. The goal of the game is place five pieces in a row.
This game implements the Swap variation. First, Player 1 places two black stones and one white. Then, Player 2 can choose to either play a white stone or pass the turn and play as black instead. This helps to eliminate the advantage inherent in playing first!
Just run go build .
to build the app!
Run ./go_gomoku -play
to start the client! The environment variables HOST
and PORT
can be used to connect to a specific server. By default, the client will try to connect to http://localhost:5000
for debugging.
Run ./go_gomoku
to start the server! Only the PORT
environment variable is used when in server mode.
Run bash test.sh
to test the app! This app includes unit tests as well as full end-to-end tests with simulated user input.
hp
: get helpmv <x> <y>
: play move- if playing first:
mv <x> <y>, <x> <y>, <x> <y>
(place two black stones and then one white stone) - if playing second: option of
mv pass
to skip turn and change colors, or standard syntax to place a black stone
- if playing first:
hm
: go home, or refresh home screen- requires confirmation if exiting game
jn <game_id>
: join a gamemg <message>
: send a message to your opponent
To run the server, run ./go_gomoku
, with optional environment variables HOST
and PORT
.