Add game data, art, constants and game logic
Add the assignment data set (50 accounts), the logo and vs art, the constants module, and the pure functions get_random_account, pick_pair, format_data and check_answer, all with Doxygen comments. pick_pair never returns the same account twice; check_answer accepts either choice on a tie. Cover them with pytest tests (22 passing). The art is built from concatenated raw lines so the backslashes survive and Doxygen does not read the backticks as markup. Accept MIL-002 after review RC-005 and add it to the Traceability Matrix. Task: MIL-002#1 Task: MIL-002#2 Task: MIL-002#3 Task: MIL-002#4 Task: MIL-002#5 Task: MIL-002#6 Closes #6 Closes #7 Closes #8 Closes #9 Closes #10 Closes #11
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
"""@file art.py
|
||||
@brief ASCII art shown by the game, as given by the assignment.
|
||||
|
||||
The lines are raw strings so the backslashes in the art survive unchanged.
|
||||
They are concatenated line by line, rather than written as one multi-line
|
||||
string, so Doxygen does not read the backticks in the art as markup.
|
||||
"""
|
||||
|
||||
## The game logo.
|
||||
logo = (
|
||||
"\n"
|
||||
r" __ ___ __ " "\n"
|
||||
r" / / / (_)___ _/ /_ ___ _____" "\n"
|
||||
r" / /_/ / / __ `/ __ \/ _ \/ ___/" "\n"
|
||||
r" / __ / / /_/ / / / / __/ / " "\n"
|
||||
r"/_/ ///_/\__, /_/ /_/\___/_/ " "\n"
|
||||
r" / / /____/_ _____ _____" "\n"
|
||||
r" / / / __ \ | /| / / _ \/ ___/" "\n"
|
||||
r" / /___/ /_/ / |/ |/ / __/ / " "\n"
|
||||
r"/_____/\____/|__/|__/\___/_/ " "\n"
|
||||
)
|
||||
|
||||
## The "vs" shown between the two accounts.
|
||||
vs = (
|
||||
"\n"
|
||||
r" _ __ " "\n"
|
||||
r"| | / /____" "\n"
|
||||
r"| | / / ___/" "\n"
|
||||
r"| |/ (__ ) " "\n"
|
||||
r"|___/____(_)" "\n"
|
||||
)
|
||||
Reference in New Issue
Block a user