Paraphrasing multiple dictionaries, a GameMaster is:
A person who organizes and oversees a role-playing game
The Persisted.World back-end enables implementing a GameMaster in code. We will be focused on enforcing the rules of our game by allowing only legal state changes.
Setup the development environment
Clone or copy this repository and open the directory in VS Code.
The tasks.json
file has been seeded with some helpful tasks that can be launched from VS Code.
Restore dotnet tools via dotnet tool restore
.
Test your environment by running the Test Task.
ctrl + shift + p
> Tasks: Run Test Task
The test project should build and all tests should run and pass.
The first thing to do is to select a unique ID for your game.
The format is not important, although I use kebab-case.
I recommend the ID is the unique name of the game plus -game-master
.
This example uses tic-tac-toe-game-master
.
Update the following locations with your GameMaster Name and ID.
gamemaster.json
Constants.cs
Next rename TicTacToeTestAttribute
to correspond to your game.
The existing Tic Tac toe scripts and tests may be adapted as a starting point for simple games.