Cards is a framework and webserver to create and host card games
These instructions will help you to set up your local development environment to contribute.
Cards is using ASP.NET, so you need to have the .NET 6 SDK installed.
As database, Cards is using MariaDB, make sure to have a working installation.
Cards is expecting following config variables, which can be set by environment variables or a secrets.json
file.
Click me!
{
"ConnectionStrings": {
"DefaultConnection": "server=localhost;user=dbuser;password=password;database=cards"
},
"EmailSender": {
"Host": "example.com",
"Port": 587,
"EnableSSL": true,
"Username": "username",
"Password": "password"
}
}
You can restore all necessary packages with dotnet restore
and run the application with dotnet run
.
To load the database tables, import this file or use the dotnet-ef
tool. Install it
with dotnet tool install --global dotnet-ef
and run dotnet ef database update
to apply the latest migration.
- Create a new game in
Data/Game/Implementations
- Your game has to implement the
IGameService
- Add your game to the
Data/Game/GameEnum.cs
enum - Add your game in
Data/Lobby.cs
to the switch statement inStartGame()
- Add a static title and description function to your game and add these to
Data/Game/IGameService.cs
static methods
Looking at existing games might help, there are already algorithms for shuffling, card implementations etc.