How deepakvalmani/chess-main works
This is an interactive C++/SFML chess game. A player chooses a mode, selects a piece, and attempts a move; the game validates it, updates the board, and reports check or game end. In AI mode the board supplies a random legal reply. The graph separates the interface, board/game rules, and piece movement. Several piece implementations are indexed but not excerpted, so their rule interactions are not asserted beyond documented polymorphism.
Main entry points: board.cpp Board and game rules · piece.h Piece base · main.cpp Game loop and UI · pawn.cpp Pawn rules
Components 11
Game interface
- Game loop and UI
include/src/main.cpp
Board and rules
- Board and game rules
include/src/board.cpp
Piece movement
- Piece base
include/piece.h - Pawn rules
include/src/pawn.cpp - Rook rules
include/src/rook.cpp - Bishop rules
include/src/bishop.cpp - Knight rules
include/src/knight.cpp - Queen rules
include/src/queen.cpp - King rules
include/src/king.cpp
Other components
- Player
- SFML
Connections 22
- Player → Game loop and UI: plays through
README.md - Game loop and UI → Board and game rules: controls
include/src/main.cpp - Board and game rules → Pawn rules: creates pieces
include/src/board.cpp - Board and game rules → Rook rules: creates pieces
include/src/board.cpp - Board and game rules → Bishop rules: creates pieces
include/src/board.cpp - Board and game rules → Knight rules: creates pieces
include/src/board.cpp - Board and game rules → Queen rules: creates pieces
include/src/board.cpp - Board and game rules → King rules: creates pieces
include/src/board.cpp - Pawn rules → Board and game rules: reads board
include/src/pawn.cpp - Rook rules → Board and game rules: reads board
include/src/rook.cpp - Game loop and UI → SFML: renders interface
README.md - Board and game rules → SFML: renders board
README.md - Pawn rules → Piece base: inherits
README.md - Rook rules → Piece base: inherits
README.md - Bishop rules → Piece base: inherits
README.md - Knight rules → Piece base: inherits
README.md - Queen rules → Piece base: inherits
README.md - King rules → Piece base: inherits
README.md - Board and game rules → Bishop rules: requests moves
- Board and game rules → Knight rules: requests moves
- Board and game rules → Queen rules: requests moves
- Board and game rules → King rules: requests moves