How jensbarthel/nnpoker works
Project type and purpose
• This is an open-source Kotlin library/application implementing the core logic for Texas Hold ’Em poker (“nnpoker”).
• It provides a domain-driven model of a casino, tables, players, dealers, cards/decks, rounds, pot, community cards and a ranking service.
• It’s packaged as a Gradle project with a small “app” entry point (CasinoApplication) and a suite of unit tests.
File structure
• Top-level build:
• build.gradle.kts, gradle.properties, Gradle wrapper under src/poker/gradle
• settings.gradle pulls in the “poker” project
• src/poker/src/main/kotlin/com/github/jensbarthel/nnpoker/
• app: CasinoApplication.kt (bootstrap)
• domain/casino: Table, Dealer, Player, BettingParty, TableObserver, TableAuthority, TableNumber
• domain/game: Round, State, Pot, CommunityCards, RankingService
• domain/game/deck: Card, Deck, DeckFactory, Suit, Face
• domain/game/hand: HandRank, HandRanker hierarchy (Compound, Flush, Straight, etc.), HoleCards
• src/poker/src/test: parallel structure of unit tests for each domain component.
README
• Very concise: “Kotlin Texas Hold ’Em.” No additional architecture notes; we’ll reverse-engineer from code structure.
Detailed separation
• Every major class or interface (Dealer, Table, Player, DeckFactory, RankingService, CompoundRanker, etc.) is a component.