A console-based implementation of the classic Truco (the gaudério one) card game written in F#.
Truco is a traditional card game played with a Spanish deck. This project implements the game logic and provides a console interface to play the game.
The project is structured with:
- Truco.Core: Core game logic library containing game models, actions, and game loop
- Truco.Console: Console application for playing the game
- Truco.Core.Test: Unit tests for the core game logic
- .NET 9 SDK or later
- Clone the repository:
git clone <repository-url>
cd truco- Build the solution:
dotnet buildRun all tests:
dotnet testRun tests with detailed output:
dotnet test --verbosity normalTo start the game, run the following command from the project root:
dotnet run --project src/Truco.Console/Truco.Console.fsprojOr navigate to the console project directory and run:
cd src/Truco.Console
dotnet runtruco/
├── src/
│ ├── Truco.Core/ # Core game logic library (domain layer)
│ └── Truco.Console/ # Console application (presentation layer)
├── test/
│ └── Truco.Core.Test/ # Unit tests
└── tools/
└── scripts/ # Useful scripts
- Language: F# 9.0
- Framework: .NET 9
- Testing: xUnit, FsUnit
- Code Coverage: Coverlet
- Add the other rules:
- Envido, real envido and falta envido
- Flower and counter-flower
- Truco, re-truco and vale quatro (four points)
- Create a web application (perhaps using Blazor)