/AspCoreCardGameEngine

A card game engine API written in AspNet Core

Primary LanguageC#Apache License 2.0Apache-2.0

AspCoreCardGameEngine

A card game engine API written in AspNet Core.

Inspired by https://deckofcardsapi.com/ (https://github.com/crobertsbmw/deckofcards written in python). This project is to create an open source AspNet Core engine.

Documentation

  1. Contribution guidelines
  2. Production setup

Contribute

Contributions are super welcome!

  • Database migrations are applied automatically in Startup via StartupHelper
  • To generate migrate script, call dotnet ef migrations add Your_new_migration_name

Roadmap

Engine

  1. Plumbing with EntityFramework (using Mysql)
  2. Add sql indexes on fields we search on
  3. Ensure Ace has value 14 in Shithead
  4. Auto-draw card if less than 4 cards in hand and deck still have cards
  5. Block shithead moves when not all players are Accepted
  6. Handle DomainException in middleware
  7. Add DelayMiddleware for development
  8. Ordering by .Updated and ThenBy .Id is not super robust, see DefaultCardOrdering
  9. When skip card is played it should calculate correct next player
  10. Setup swagger/Swashbuckle
  11. Create deck (shuffled, not shuffled, multiple decks, jokers)
  12. Card images - removed from backend, the frontend can take care of this
  13. Draw from deck
  14. Shuffle deck
  15. Create partial deck
  16. Create pile (discarding, player hands)
  17. Shuffle pile
  18. List cards in pile
  19. Draw from pile (top, bottom, random)
  20. Rules engine (to implement games)
  21. Realtime updates (SignalR)
  22. Deal with all throw new NotImplementedException()
  23. TODO comments

Games

  1. Shithead
  2. Rummy