The Coolest Chess
  • The Chess Documentation
    • Chess Game Introduction
    • Essential Prefabs
    • Components
  • Importing Stockfish AI
  • Controller
    • Base Controller
    • Two Player Controller
  • The UIs
    • Button Prefabs
    • UI Events
    • Enquiry
    • Replacing UI
    • Others
  • Scenes Details
    • ChessPGN
    • ChessPuzzleEditor
    • ChessPuzzle
    • ChessAI
  • Honorable Mentioned
    • ChessBoard class
    • GUI Classes
    • Game Logic Classes
    • The Architecture Notice
  • Customization
    • Time AI
    • AI Draw Game
    • TypeI AI
    • TypeII AI
    • Event Based Functions
    • Chess Game Finishing Rule
  • Unit Tests
Powered by GitBook
On this page
  1. Honorable Mentioned

Game Logic Classes

Game logic are classes that manages all the computation and chess game states

To use any of the classes here, static ChessAttackTable.SetupPiecesAttackTable() function had to be called in order to setup pieces attack. It just need to be called once in the entire gameplay.

Game Logic Inheritence Hierachy (Inheritence Level In Ascending Order) :

ChessGameBase - The base chess game logic class, do not contain chess rule such as legal move, made for moving chess without restriction.

Used by :

1) PlaygroundGUI

ChessGame - Contain absolute chess rules and logic needed for creating a holistic, feature rich chess game including undo move, executing move, get, convert algebraic notations related functions, check game finishing state, get legal moves etc.

Used by :

1) ChessBaseGUI

2) ChessGameBaseGUI

3) ChessQueueableGameGUI

4) ChessSinglePlayerGameGUI

5) ChessMultiControlGameGUI

6) ChessTwoPlayerGameGUI

ChessGameScoring - The class that record and compute chess board position score after each move.

ChessGameAI - Contains all the AI logic such as draw or resign analysis, a container for commanding action towards underlying chess AI types inlcuding TypeI and TypeII AI.

Used by :

1) ChessGameAIGUI

2) ChessGameMultiAIGUI

ChessGameScoring => ChessGameMoveVariant - The main purpose of this game logic is to record and manipulate fixed moves to different possible variants, mainly used for game analytic features. Containing pointer that's pointing to the current move, whether it's a fixed move or move variant and it's location.

Used by :

1) ChessGamePGNGUI

ChessGamePuzzle - Containing all the puzzle logic that dictate puzzle game rules, like validate if any moves matches puzzle data etc. The game finishing rule has been overriden to solve the puzzle, other than that is failing puzzle.

Used by :

1) ChessPuzzleGUI

ChessGameMoveVariant => ChessPuzzleEditor - Including all the functionality that can help ChessPuzzleEditorGUI provide a holistic, working puzzle editor. One distinct functionality is to cut fixed move from move variant or fixed move to move variant, at which the pointer is pointing at.

Used by :

1) ChessPuzzleEditorGUI

PreviousGUI ClassesNextThe Architecture Notice

Last updated 2 months ago