Skip to content

Cheat Mode

DuncanSzabaga edited this page Nov 23, 2025 · 1 revision

Cheat Mode

is a developer tool used to debug the game, test features.

Image Image

How it Works

The Cheat Mode is implemented as an overlay layer ("CheatMode") that sits on top of the game.

  1. State Management: A global variable global.is_cheatmode_opened tracks whether the menu is open.
  2. Visibility: The CheatPanel object checks this variable every frame.
    • If true: It shows the "CheatMode" and "CheatModeLabels" layers.
    • If false: It hides them.
  3. Interaction: When Cheat Mode is open, normal game interactions (global.allow_interactions) are often disabled to prevent accidental clicks on the board while using the menu.

How to Use

1. Opening Cheat Mode

  • Click the Cheat Mode button (usually a hidden or small button in the UI).
  • Effect: The cheat overlay appears, and the game pauses normal interactions.

2. Available Cheats

Once the menu is open, you can use the following features:

🕒 Timer Controls

  • Stop Timer: Pauses the global game timer (global.timer_enabled = false).
  • Resume Timer: Resumes the global game timer.

♟️ Board Controls

  • Restart Board: Instantly resets the chess board to its starting state (calls restartBoard()).

🃏 Card Controls

  • Reset Card: Clears the player's hand and forces the CardHandler to rebuild the deck/hand.

3. Closing Cheat Mode

  • Click the Close button (or toggle the Cheat Mode button again).
  • Effect: The overlay disappears, and normal game interactions resume.

Clone this wiki locally