Razboi
Phase 1 — Core deck, rules & round logic
- Standard 52-card deck, shuffle, split evenly (Player vs CPU)
- Battle loop: each side draws top card; higher rank wins the stack
- “War” tie resolution (3 face-down + 1 face-up; configurable if short)
- Score = total cards owned; model is UI-agnostic
Functional result: A small script can simulate rounds, including wars, transferring won stacks and updating both piles until one player owns all cards or decks are exhausted.
Phase 2 — Minimal GUI: layout & basic play
- Tkinter window: two card placeholders (Player/CPU), “Play” button, score labels
- On click: draw, reveal both cards, update scores/stack owner
- Disable button while resolving a round; simple text render for cards (e.g., “K♠”)
- Deck counts displayed per player
Functional result: Clicking “Play” reveals two cards side by side, awards the stack to the winner, updates scores and deck counters, and keeps the interface responsive.
Phase 3 — War visualization & round flow
- When tie: stepwise war sequence (face-down placeholders, then face-up reveal)
- Brief timed transitions or a “Next” button to advance steps
- Accumulate the pot correctly across chained wars
- End-of-game detection (one player out of cards)
Functional result: Ties trigger a visible war sequence; the pot grows and is awarded properly; chained wars resolve correctly; the UI indicates when the game ends.
Phase 4 — Finish: restart & light safeguards
- “Restart” resets decks, scores, and UI; new shuffle each time
- Minimal safeguards: prevent double-click during animations; handle short decks in war by using whatever cards remain
Functional result: Users can restart a fresh match; clicking during resolution is safely ignored; edge cases (insufficient cards during war) are handled without crashes.