┌────────────┐ ┌────────────┐ ┌────────────┐
│ │ │ │ │ │
│ Main │───────▶│ GamePlay │─────────▶│ State │
│ │ │ │ │ │
└────────────┘ └────────────┘ └────────────┘
│
│
▼
┌────────────┐
│ │
│ Board │
│ │
└────────────┘
Main
handles the input and output and callGamePlay
for thing to print.GamePlay
holds theState
and theBoard
. It mainly process the input and generate the output.State
just say what the game should be doing now.Board
say how big it is, whether a cell should bex
oro
and check wins or draw.
python game/main.py <size_of_grid>
size_of_grid
is optional. Default to 3.- No max size check is done on
size_of_grid
, as long it is a number.
Only require py.test for testing.
pip install -r requirements.txt
make test