Implements the coffee machine: constants (menu, coins, starting resources, messages), report, is_resource_sufficient, process_coins, is_transaction_successful, make_coffee and the main loop. Money is counted in whole cents.
Checked with ruff, mypy --strict, pytest and doxygen, plus a scripted session covering report, refusal on low resources, refund, change, profit, unknown input and off.
Notes for the reviewer:
The report prints $2.50 where the assignment prints $2.5.
process_coins re-asks on non-numeric or negative coin counts (not in the assignment).
tests/test_smoke.py now feeds off so the loop exits; the real tests come in MIL-003.
Implements the coffee machine: constants (menu, coins, starting resources, messages), report, is_resource_sufficient, process_coins, is_transaction_successful, make_coffee and the main loop. Money is counted in whole cents.
Checked with ruff, mypy --strict, pytest and doxygen, plus a scripted session covering report, refusal on low resources, refund, change, profit, unknown input and off.
Notes for the reviewer:
- The report prints `$2.50` where the assignment prints `$2.5`.
- process_coins re-asks on non-numeric or negative coin counts (not in the assignment).
- tests/test_smoke.py now feeds `off` so the loop exits; the real tests come in MIL-003.
Closes #6
Closes #7
Closes #8
Closes #9
Closes #10
Closes #11
Closes #12
Add the menu, coin values, starting resources and message texts to
constants.py. Implement report, is_resource_sufficient, process_coins,
is_transaction_successful, make_coffee and the main loop. Money is
counted in whole cents. The smoke test now feeds "off" so the loop
exits.
Closes#6Closes#7Closes#8Closes#9Closes#10Closes#11Closes#12
Task: MIL-002#1
Task: MIL-002#2
Task: MIL-002#3
Task: MIL-002#4
Task: MIL-002#5
Task: MIL-002#6
Task: MIL-002#7
Tirsvad
merged commit 9b5eff7163 into main2026-10-06 13:52:18 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements the coffee machine: constants (menu, coins, starting resources, messages), report, is_resource_sufficient, process_coins, is_transaction_successful, make_coffee and the main loop. Money is counted in whole cents.
Checked with ruff, mypy --strict, pytest and doxygen, plus a scripted session covering report, refusal on low resources, refund, change, profit, unknown input and off.
Notes for the reviewer:
$2.50where the assignment prints$2.5.offso the loop exits; the real tests come in MIL-003.Closes #6
Closes #7
Closes #8
Closes #9
Closes #10
Closes #11
Closes #12