# oscarg10101/chessanalysisstudio architecture

> Architecture diagram of the GitHub repository oscarg10101/chessanalysisstudio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oscarg10101/chessanalysisstudio
- Repository: https://github.com/oscarg10101/chessanalysisstudio

## Overview

Chess Analysis Studio is a WinForms chess application: the player selects a named Stockfish opponent, plays through an interactive board, and can view live evaluation, move history, undo moves, and request post-game analysis. The documented MVP split is visible in the tree, though several presenter and view implementations were not sampled; connections for those are based on the README. Stockfish is an external executable, not included in the repository.

Main entry points: [`Ajedrez interactuable con form/Servicios/PresentadorPartida.cs`](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Servicios/PresentadorPartida.cs) (Game presenter), [`Ajedrez interactuable con form/Servicios/PresentadorMenu.cs`](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Servicios/PresentadorMenu.cs) (Menu presenter), [`Ajedrez interactuable con form/Vistas/FormPartida.cs`](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Vistas/FormPartida.cs) (Game screen), [`Ajedrez interactuable con form/Vistas/FormMenu.cs`](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Vistas/FormMenu.cs) (Opponent menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_menu["Opponent menu<br/>[FormMenu.cs]"]
  node_menucontract["Menu view contract<br/>[IVistaMenu.cs]"]
  node_gameview["Game screen<br/>[FormPartida.cs]"]
  node_gamecontract["Game view contract<br/>[IVistaPartida.cs]"]
  node_visuals["Piece and opponent art"]
end

subgraph group_presenters["Application coordination"]
  node_menupresenter["Menu presenter<br/>[PresentadorMenu.cs]"]
  node_gamepresenter["Game presenter"]
end

subgraph group_chess["Chess domain"]
  node_board["Board and rules<br/>[TableroAjedrez.cs]"]
  node_pieces["Chess pieces<br/>[Pieza.cs]"]
  node_moves["Move data<br/>[Movimiento.cs]"]
  node_outcome["Game outcome"]
  node_opponent["Opponent type<br/>[TipoRival.cs]"]
end

subgraph group_engine["Engine integration"]
  node_motor["Move engine adapter<br/>[StockfishMotor.cs]"]
  node_analyst["Analysis adapter"]
end

node_player(("Player"))
node_program["Application entry<br/>[Program.cs]"]
node_stockfish["Stockfish executable"]

node_program -->|"opens"| node_menu
node_program -->|"creates"| node_menupresenter
node_player -->|"selects rival"| node_menu
node_menu -->|"signals choice"| node_menupresenter
node_menupresenter -->|"starts game"| node_gamepresenter
node_menupresenter -->|"uses view"| node_menucontract
node_player -->|"plays moves"| node_gameview
node_gameview -->|"sends actions"| node_gamepresenter
node_gamepresenter -->|"updates view"| node_gamecontract
node_gamepresenter -->|"updates game state"| node_board
node_board -->|"stores positions"| node_pieces
node_gamepresenter -->|"requests legal moves"| node_motor
node_gamepresenter -->|"requests best move"| node_motor
node_gamepresenter -->|"requests evaluation"| node_analyst
node_motor -->|"sends UCI commands"| node_stockfish
node_analyst -->|"sends analysis commands"| node_stockfish
node_gameview -->|"displays assets"| node_visuals

click node_program "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Program.cs"
click node_menu "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Vistas/FormMenu.cs"
click node_menucontract "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Vistas/IVistaMenu.cs"
click node_gameview "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Vistas/FormPartida.cs"
click node_gamecontract "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Vistas/IVistaPartida.cs"
click node_visuals "https://github.com/oscarg10101/chessanalysisstudio/tree/main/Ajedrez%20interactuable%20con%20form/Recursos/Imagenes"
click node_menupresenter "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Servicios/PresentadorMenu.cs"
click node_gamepresenter "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Servicios/PresentadorPartida.cs"
click node_board "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Modelos/TableroAjedrez.cs"
click node_pieces "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Modelos/Pieza.cs"
click node_moves "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Modelos/Movimiento.cs"
click node_outcome "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Modelos/ResultadoPartida.cs"
click node_opponent "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Modelos/TipoRival.cs"
click node_motor "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Servicios/StockfishMotor.cs"
click node_analyst "https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Servicios/StockfishAnalista.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_menu,node_menucontract,node_gameview,node_gamecontract,node_visuals toneBlue
class node_menupresenter,node_gamepresenter toneAmber
class node_board,node_pieces,node_moves,node_outcome,node_opponent toneMint
class node_motor,node_analyst toneRose
class node_player,node_stockfish toneIndigo
class node_program toneTeal
```

## Components

### User interface

- [Opponent menu](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Vistas/FormMenu.cs): `Ajedrez interactuable con form/Vistas/FormMenu.cs`
- [Menu view contract](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Vistas/IVistaMenu.cs): `Ajedrez interactuable con form/Vistas/IVistaMenu.cs`
- [Game screen](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Vistas/FormPartida.cs): `Ajedrez interactuable con form/Vistas/FormPartida.cs`
- [Game view contract](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Vistas/IVistaPartida.cs): `Ajedrez interactuable con form/Vistas/IVistaPartida.cs`
- [Piece and opponent art](https://github.com/oscarg10101/chessanalysisstudio/tree/main/Ajedrez%20interactuable%20con%20form/Recursos/Imagenes): `Ajedrez interactuable con form/Recursos/Imagenes`

### Application coordination

- [Menu presenter](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Servicios/PresentadorMenu.cs): `Ajedrez interactuable con form/Servicios/PresentadorMenu.cs`
- [Game presenter](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Servicios/PresentadorPartida.cs): `Ajedrez interactuable con form/Servicios/PresentadorPartida.cs`

### Chess domain

- [Board and rules](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Modelos/TableroAjedrez.cs): `Ajedrez interactuable con form/Modelos/TableroAjedrez.cs`
- [Chess pieces](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Modelos/Pieza.cs): `Ajedrez interactuable con form/Modelos/Pieza.cs`
- [Move data](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Modelos/Movimiento.cs): `Ajedrez interactuable con form/Modelos/Movimiento.cs`
- [Game outcome](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Modelos/ResultadoPartida.cs): `Ajedrez interactuable con form/Modelos/ResultadoPartida.cs`
- [Opponent type](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Modelos/TipoRival.cs): `Ajedrez interactuable con form/Modelos/TipoRival.cs`

### Engine integration

- [Move engine adapter](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Servicios/StockfishMotor.cs): `Ajedrez interactuable con form/Servicios/StockfishMotor.cs`
- [Analysis adapter](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Servicios/StockfishAnalista.cs): `Ajedrez interactuable con form/Servicios/StockfishAnalista.cs`

### Other components

- **Player**
- [Application entry](https://github.com/oscarg10101/chessanalysisstudio/blob/main/Ajedrez%20interactuable%20con%20form/Program.cs): `Ajedrez interactuable con form/Program.cs`
- **Stockfish executable**

## Connections

- Application entry → Opponent menu: opens
- Application entry → Menu presenter: creates
- Player → Opponent menu: selects rival
- Opponent menu → Menu presenter: signals choice
- Menu presenter → Game presenter: starts game
- Menu presenter → Menu view contract: uses view
- Player → Game screen: plays moves
- Game screen → Game presenter: sends actions
- Game presenter → Game view contract: updates view
- Game presenter → Board and rules: updates game state
- Board and rules → Chess pieces: stores positions
- Game presenter → Move engine adapter: requests legal moves
- Game presenter → Move engine adapter: requests best move
- Game presenter → Analysis adapter: requests evaluation
- Move engine adapter → Stockfish executable: sends UCI commands
- Analysis adapter → Stockfish executable: sends analysis commands
- Game screen → Piece and opponent art: displays assets
