Files
Tirsvad 314f8b4d77 Add wiki in English, Danish and Bahasa Malaysia and the wiki publish workflow
Nine pages per language (home, description, install, one page per
lecture step with its screenshot and what was gained, appendix) plus the
sidebar. Doxygen now runs without warnings. The publish workflow is the
framework template, unchanged.

Task: MIL-005#1
Task: MIL-005#2
Task: MIL-005#3
Task: MIL-005#4
Task: MIL-005#5
Closes #24
Closes #25
Closes #26
Closes #27
Closes #28
2026-10-28 17:03:46 +08:00

1.5 KiB

Description

🌐 English · Dansk · Bahasa Melayu

What the project is

The bot opens Cookie Clicker in Chrome, clicks the big cookie as fast as the game allows, visits the store every five seconds and buys the most expensive product it can afford. After 300 seconds it reads the cookies per second and prints Result : <cps>.

How the code is layered

The code follows a small Clean Architecture, so the decisions can be tested without a browser.

Layer Holds Knows about Selenium?
domain Number parsing (parse_game_number) and the purchase choice (choose_upgrade) No
application The lecture step functions and the ports GamePort and Clock No
infrastructure SeleniumGame (the adapter) and SystemClock Yes
presentation main and the screenshot capture, the composition roots Through the adapter

constants.py holds the address, the element ids, the timings and the number words, so a change in the game's page is a change in one file.

The one dependency

selenium is the only runtime dependency. A bot cannot drive a browser without it, and the assignment uses it. The reasons and the options that were rejected are in ADR-0001 (see Appendix).

What the tests prove

The 99 tests use a fake game and a fake clock. They run in a second, need no Chrome and no network, and cover the parser, the strategy, the loop and the command line. The real game was exercised only in Docker (see step 5).