rules for making the piece tester
🎯 Purpose: The Piece Tester allows users to simulate and validate the behavior of custom chess pieces defined in the Piece Editor. It offers an interactive 8x8 board with real-time turn simulation, movement validation, ability testing, cooldowns, resurrection, and full state tracking — all in an isolated environment.
🖼️ UI Layout Overview (PyQt)
+--------------------------------------------------------------+ | Piece Tester Window | +--------------------------------------------------------------+ | Load Piece: [ Dropdown, color picker ] | | | Piece on Board Info: [ Live Preview Panel ] | | | | 8x8 Test Board (QGraphicsView / QTableWidget) | | - Drag/drop or click to place pieces | | - Click piece to view info + highlight valid actions | | - Double-click to trigger ability if applicable | | | | Turn Controls: | | [ Next Turn ] [ Reset Board ] [ Clear Log ] [ Save State ] | | | | Log / Status Console: | | - Action feedback, point changes, ability triggers | | | +--------------------------------------------------------------+
📚 Core Features & Behaviors
🔹 Piece Placement
Place
, Move
, Test Ability
, Erase
canStack
, shareSpace
, carryPiece
🔹 Interactive Board
🔹 Turn Simulation
Next Turn
:
• Apply recharge logic
• Reduce cooldowns
• Tick down resurrection
• Trigger passive behaviors (e.g. prayer, adjacency gain)⚔️ Ability Testing
Each piece should be able to:
🧩 State Tracking Per Piece
| Property | Description | |---------------------|---------------------------------------------------| | Position | x, y grid coords | | Current Points | Tracks ability usage/recharge | | Cooldowns | Dict of abilities currently cooling down | | Resurrection Status | Countdown (if applicable) | | Shared Tile | Tracks stacked or carried pieces (if allowed) |
🔍 UI Panels & Components
| Section | Details |
|------------------------|------------------------------------------------------|
| Piece Picker Panel | Select from saved /data/pieces/
.json files |
| Active Piece Panel | Shows currently selected piece’s:
name, points, abilities, cooldowns |
| Board Grid | Click-based or drag interaction |
| Log Output | Scrollable QTextEdit log of moves/abilities |
| Ability Buttons | Dynamically appear for piece with active abilities |
| Overlay Layer | Paint visual effects: move range, AoE, LoS, etc. |
📦 Data & File Handling
data/pieces/
data/tester_logs/
.json
✅ Suggested File Structure
piece_tester.py
: UI layout and board managementtester_engine.py
: Handles all test logictester_session.json
: Stores piece states and positionsoverlay_renderer.py
: Paints highlight tiles
--