trictrac/README.md

1.5 KiB

Trictrac

This is a game of Trictrac rust implementation.

Usage

Install devenv, start a devenv shell devenv shell, and run the following commands.

# Run the relay server
just build-relay
just run-relay  # listens on :8080

# Run the game (separate terminal)
just dev

Open a browser window at http://127.0.0.1:9091. You can play against a very basic bot, or invite an other player to connect at the same address.

Code structure

  • game rules and game state are implemented in the store/ folder.
  • a server for the network game is implemented in server/relay-server, which uses server/protocol
  • the web client is in clients/web, it connects to the server using the clients/backbone-lib library
  • the command-line application is implemented in clients/cli/; it allows you to play against a bot, or to have two bots play against each other
  • the bots algorithms and the training of their models are implemented in the bot/ and spiel_bot folders. This is a work in progress, they are not performant at all.

Inspirations

The multiplayer game architecture, implemented in packages clients/backbone-lib, clients/web/game, server/protocol and server/relay-server is a Leptos-optimized adaptation of the macroquad-based Carbonfreezer/multiplayer project.

The web client UX/UI is inspired by https://playtiao.com.