Requires PythonExtra runtime to execute. Install PythonExtra before using this application.
Enclose the Horse is a strategic puzzle game for the CASIO ClassPad II (fx-CP400) where you must trap a wandering horse using a limited supply of walls. Plan your placements carefully, collect cherries for bonus points, and achieve optimal scores across nine progressively challenging levels. A thoughtful, methodical experience that rewards planning over reflexes.
| Input | Action |
|---|---|
| Touch on grass tile | Place or remove a wall |
| SHIFT key | Reset all walls on current level |
| EXIT key | Quit game |
| Top-left "?" button | Open help modal |
| Top-right ">" button | Advance to next level |
| Save button | Save current high score |
Water tiles (~) cannot have walls placed on them. The horse (H) and cherries (C) are fixed obstacles.
Place walls to completely enclose the horse, preventing any path from the horse to the grid edge. Once enclosed, your score is calculated based on:
If the horse can still reach the edge, your score is zero.
Each level provides:
Complete levels in order or use the next-level button to skip ahead.
High scores are stored in horse.dat using a semicolon-delimited format:
LEVEL_ID:SCORE;LEVEL_ID:SCORE;...
The file is automatically created on first save and updated when you confirm saving a new high score. Deleting horse.dat resets all progress.
If the game fails to launch, verify that PythonExtra is properly installed and that the Gint library is accessible. If touch input does not register wall placements, ensure you are tapping on grass tiles (not water, horse, or cherries). If scores do not save, confirm that the calculator has write access to the storage directory. For persistent issues, re-download the source file and ensure it was transferred completely to calculator storage.
Enclose the Horse was developed by Phoebe as part of the MiscPythonExtra collection to demonstrate puzzle game design, pathfinding algorithms, and optimized rendering techniques using Python on calculator hardware. The code serves as a reference for flood-fill logic, selective screen updates, and lightweight save systems in resource-constrained environments. Source code is available in the project repository for educational purposes and community contributions.
For bug reports, level design feedback, or discussion about Enclose the Horse and other Python-based ClassPad puzzles, visit the MiscPythonExtra repository on GitHub. Community contributions, optimal solution shares, and custom level ideas are welcome to help expand the puzzle experience and inspire other developers working on calculator-based strategy games.