Skip to content

govariantsteam/govariants

Repository files navigation

Go Variants

A place to play Go variants.

Set up

Install and run the database

Follow these instructions to install MongoDB Community Edition and start mongod

Install and run the app

Make sure you have yarn installed, then in the root of this repo, run:

yarn

This will install dependencies in the three main subdirectories in packages/: client/, server/ and shared/.

To run the app, you can run

yarn build
yarn start

This will start two dev servers. One is a Vue server listening on localhost:5173, and the other is an Express server listening on localhost:3001.

Variant Demos

See #249 for information about variant demos, can also be used to develop variants without setting up MongoDB.

Creating a new variant

This PR has a simple example showing how to add chess to the repo: #105

There are two main files to be concerned with: shared/src/chess/chess.ts and vue-client/src/components/boards/ChessBoard.ts. The former specifies the rules of the game while the latter specifies how to render it on the client.

Disclaimer: the structure of the repo is changing rapidly, so the above PR may be outdated. Feel free to reach out in the forums thread if you need help creating a variant.