A simple Connect4 game created with Dropwizard.
- Can play with 2+ players
- Customizable grid dimensions (must contain at least 1 square)
- Choose how many consecutive tokens are required for a win (i.e. Connect5, Connect100, etc.)
Run the jar with a YAML containing your desired config.
java -jar target/connect4-1.0-SNAPSHOT.jar server connect4.ymlThe above example contains the example config, connect4.yml, but any YAML file that follows its structure can be used.
To view the grid, current player, and additional messages, refresh http://localhost:8080/connect-4/grid throughout the game.
To drop a token in a certain column (1-indexed):
curl -H "Content-Type: application/json" --data '{"column":1}' http://localhost:8080/connect-4/playTo restart the game:
curl -X PUT http://localhost:8080/connect-4/restart