The game updates the price and owned text at once but the affordable flag only at its next redraw, so a second purchase in the same visit used a stale flag. Buying at most one product per visit cut the failed purchases from about 40 percent to 1 of 49 and raised the CPS from 16.6 to 29 in the 300 second Docker run. README, screenshots and the wiki in en, da and ms show the new result. Task: MIL-006#1 Task: MIL-006#2 Task: MIL-006#3 Task: MIL-006#4 Task: MIL-006#5
18 lines
460 B
Python
18 lines
460 B
Python
"""@file
|
|
@brief Guards the timing constants the bot relies on.
|
|
"""
|
|
|
|
from cookie_clicker_bot import constants
|
|
|
|
|
|
def test_run_duration_is_five_minutes() -> None:
|
|
assert constants.RUN_DURATION_SECONDS == 300
|
|
|
|
|
|
def test_store_is_visited_every_second() -> None:
|
|
assert constants.STORE_CHECK_INTERVAL_SECONDS == 1
|
|
|
|
|
|
def test_store_check_happens_inside_the_run() -> None:
|
|
assert 0 < constants.STORE_CHECK_INTERVAL_SECONDS < constants.RUN_DURATION_SECONDS
|