Templates
The game uses two main templates to represent the board state and display pieces.casilla Template
Defines the structure of each square on the chess board.Template Slots
Row number of the square (1-8)
Column number of the square (1-8)
Identifier for the square’s content:
0- White square (empty)1- Black square (empty)4- Square with mouse5 1- Square with cat #15 2- Square with cat #25 3- Square with cat #35 4- Square with cat #4
The
valor slot uses a multislot to store both the piece type (5 for cat) and the cat’s ID number.pieza Template
Defines the visual representation of pieces for console display.Template Slots
Links to the casilla valor field (0, 1, 4, or 5)
First line of the ASCII art representation (7 characters wide)
Second line of the ASCII art representation (7 characters wide)
Third line of the ASCII art representation (7 characters wide)
Initial Facts
Thehechos-iniciales deffacts establishes the initial game state.
Control Facts
Triggers the rule to initialize the blank board (all 64 squares)
Controls which square is currently being printed. Starts at (1 1)
Indicates which part (1-3) of the piece ASCII art to print
Triggers the board rendering rule
Piece Visual Definitions
Each piece type has an associated visual representation:White Square (valor 0)
Black Square (valor 1)
Mouse (valor 4)
Cat (valor 5)
Board Representation
The board is an 8x8 checkerboard where:- Rows: Numbered 1-8 (bottom to top)
- Columns: Numbered 1-8 (left to right)
- Only black squares are playable (like checkers)
- Initial Setup:
- Mouse starts at row 1, column 4
- Four cats start at row 8 on black squares (columns 1, 3, 5, 7)
The game uses a standard chess board layout where only the dark squares are used, similar to checkers.