CS50P: CS50's Introduction to Programming with Python
Davte 17075632d0 Final project: chessboard puzzle game | 1 rok temu | |
---|---|---|
problems | 1 rok temu | |
.gitignore | 1 rok temu | |
LICENSE | 1 rok temu | |
README.md | 1 rok temu | |
project.py | 1 rok temu | |
requirements.txt | 1 rok temu | |
test_project.py | 1 rok temu |
This script implements a puzzle game described here. I heard about it thanks to 3blue1brown and Stand-up Maths who played it and explained it here.
The script generates three pdf files: Problem, Key and Solution.
Key.pdf
shows the initial 8x8 grid, filled with random heads (H) or tails
(T), with an orange coin where the invisible key is hidden.
This is how the grid looks like when the judge shows it to Player 1
asking them to flip one and only one coin.Problem.pdf
shows the same grid with just one coin flipped by Player 1.
This is how the grid looks like when the judge shows it to Player 2 after
Player 1 has flipped one coin.Solution.pdf
shows the same grid, with an orange coin and a purple coin.
The orange one is where the key is hidden, the purple-background coin
is the one to flip to communicate where the key is.Key.pdf
: a grid with one key hidden.Solution.pdf
, thus producing the same grid
shown in Problem.pdf
.Problem.pdf
and ask them to identify where the key is.
They should point to the orange coin in Key.pdf
and Solution.pdf
.