Skip to content

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carubbi.Cards

Framework to develop card games in .NET

The solution contains:

Project Description
Carubbi.Cards Core framework: Card, CardSet, Deck, Suit (.NET 10)
Carubbi.Cards.WinForms WinForms controls: CardBox, CardSetPanel + card image resources
Carubbi.BlackJack Blackjack game logic over the core
Carubbi.BlackJack.UI Blackjack UI (follows the project template standard)
Carubbi.SlotCard Video poker machine logic
Carubbi.SlotCard.UI Video poker machine UI
Carubbi.RobaMonte "Roba Monte" deck-stealing game logic
Carubbi.RobaMonte.UI "Roba Monte" UI (split from the former monolith)
Carubbi.Sabao "Sabão" game (logic + UI)
CardGameProjectTemplate Starter template for new games

Test projects pair with their assembly: Carubbi.Cards.Tests, Carubbi.BlackJack.Tests, Carubbi.RobaMonte.Tests — all TUnit.

Requirements

  • .NET 10 SDK (or newer)

Build and test

dotnet build Carubbi.Cards.slnx
dotnet run --project Carubbi.Cards.Tests
dotnet run --project Carubbi.BlackJack.Tests
dotnet run --project Carubbi.RobaMonte.Tests

CI runs build + all test suites on every push/PR (.github/workflows/ci.yml).

Quality scripts (PowerShell)

Script What it does
scripts/run-coverage.ps1 Runs all *.Tests projects with coverage (MTP code coverage), one cobertura file per suite in TestResults/coverage/. -Report merges them into a single HTML report (ReportGenerator); -Open opens it. Pass -TestProjects <paths> to restrict.
scripts/run-mutation-tests.ps1 Runs Stryker per logic assembly (Carubbi.Cards, Carubbi.BlackJack, Carubbi.RobaMonte) against its paired test project, using the MTP test runner. Installs dotnet-stryker on first use. Reports: TestResults/mutation/<Project>/. -Open opens the last report.

Package versions are centralized in Directory.Packages.props (CPM); shared build settings in Directory.Build.props.

Core API notes

  • Deck supports an optional injectable Random (new Deck(1, true, myRandom)) and a reproducible seeded shuffle via Shuffle(int seed); Deck.GameNumber identifies the current game/shuffle.
  • CardSet.Draw(index) removes and returns the card at an index (throws when out of range); GetTop/GetBottom return null when empty.
  • Card face images live in Carubbi.Cards.WinForms (CardImages.GetImage(card), ImageKey on Card), keeping the core free of System.Drawing.

About

Framework to Develop Card Games in .net

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages