How maramani/pop-it works
Pop-it is a two-player, turn-based console game: the user opts in, chooses a row layout, and then players alternate removing objects until the game-ending condition is reached. The main script coordinates setup and play; game logic handles layout creation, display, move selection and validation, and state updates. The shared row counts live in an in-memory dictionary, not a persistent store. The relationships shown are supported by the supplied excerpts; the README also documents 7-5-3 and square layouts, but does not identify separate implementations for them.
Main entry points: myfunctions.py Turn loop · main.py Game entry
Components 7
Game flow
- Game entry
main.py - Turn loop
myfunctions.py
Rules and state
- Layout setup
myfunctions.py - Board display
myfunctions.py - Move selection
myfunctions.py - Row state
myfunctions.py
Other components
- Player
Connections 12
- Player → Game entry: starts and responds
main.py - Game entry → Layout setup: calls setup
main.py - Game entry → Turn loop: starts play
main.py - Layout setup → Player: requests layout
myfunctions.py - Layout setup → Row state: sets row counts
myfunctions.py - Turn loop → Board display: prints board
myfunctions.py - Board display → Row state: reads row counts
myfunctions.py - Turn loop → Move selection: requests move
myfunctions.py - Move selection → Player: requests row and count
myfunctions.py - Move selection → Row state: checks row counts
myfunctions.py - Turn loop → Row state: updates row counts
myfunctions.py - Turn loop → Turn loop: recurses next turn
myfunctions.py