# kaloou/battlerobot-solo architecture

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

- Interactive diagram: https://gitdiagram.com/kaloou/battlerobot-solo
- Repository: https://github.com/kaloou/battlerobot-solo

## Overview

BattleRobot-solo is a console-based, networked robot-combat game. A client connects to a hosting server, both players configure robots, then alternate actions until a robot is destroyed or the connection is lost; players can request another match. The shared core supplies robot combat rules, match state, console interaction, and line-based JSON/object and byte transport. Relationships below follow the sampled programs and source references; unsampled project files are not used to infer additional features.

Main entry points: [`BattleRobot-solo/BattleRobot-solo-client/Program.cs`](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-client/Program.cs) (Client loop), [`BattleRobot-solo/BattleRobot-solo-server/Program.cs`](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-server/Program.cs) (Host loop), [`BattleRobot-solo/BattleRobot-solo-server/Server.cs`](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-server/Server.cs) (Server session), [`BattleRobot-solo/BattleRobot-solo-core/models/Partie.cs`](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-core/models/Partie.cs) (Match state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client gameplay"]
  node_client_app["Client loop<br/>[Program.cs]"]
  node_client_conn["Client connection<br/>[Client.cs]"]
end

subgraph group_core["Shared game core"]
  node_player_transport["Player transport<br/>[Joueur.cs]"]
  node_console["Console interaction<br/>[Systeme.cs]"]
  node_match["Match state<br/>[Partie.cs]"]
  node_robot["Robot combat<br/>[Robot.cs]"]
end

subgraph group_server["Server hosting"]
  node_server_app["Host loop<br/>[Program.cs]"]
  node_server["Server session<br/>[Server.cs]"]
end

node_player(("Player"))

node_player -->|"plays through"| node_client_app
node_client_app -->|"gets input"| node_console
node_client_app -->|"connects via"| node_client_conn
node_client_app -->|"exchanges messages"| node_player_transport
node_client_app -->|"updates and displays"| node_match
node_client_conn -->|"opens streams"| node_player_transport
node_client_conn -->|"configures robot"| node_console
node_player -->|"plays through"| node_server_app
node_server_app -->|"runs session"| node_server
node_server_app -->|"creates match"| node_match
node_server_app -->|"creates robot"| node_robot
node_server_app -->|"gets input"| node_console
node_server -->|"exchanges messages"| node_player_transport
node_server -->|"gets actions"| node_console
node_server -->|"applies actions"| node_robot
node_server -->|"sets match status"| node_match
node_match -->|"holds robots"| node_robot

click node_client_app "https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-client/Program.cs"
click node_client_conn "https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-client/Client.cs"
click node_server_app "https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-server/Program.cs"
click node_server "https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-server/Server.cs"
click node_player_transport "https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-core/models/Joueur.cs"
click node_console "https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-core/views/Systeme.cs"
click node_match "https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-core/models/Partie.cs"
click node_robot "https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-core/models/Robot.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_client_app,node_client_conn toneBlue
class node_player_transport,node_console,node_match,node_robot toneAmber
class node_server_app,node_server toneMint
class node_player toneIndigo
```

## Components

### Client gameplay

- [Client loop](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-client/Program.cs): `BattleRobot-solo/BattleRobot-solo-client/Program.cs`
- [Client connection](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-client/Client.cs): `BattleRobot-solo/BattleRobot-solo-client/Client.cs`

### Shared game core

- [Player transport](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-core/models/Joueur.cs): `BattleRobot-solo/BattleRobot-solo-core/models/Joueur.cs`
- [Console interaction](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-core/views/Systeme.cs): `BattleRobot-solo/BattleRobot-solo-core/views/Systeme.cs`
- [Match state](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-core/models/Partie.cs): `BattleRobot-solo/BattleRobot-solo-core/models/Partie.cs`
- [Robot combat](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-core/models/Robot.cs): `BattleRobot-solo/BattleRobot-solo-core/models/Robot.cs`

### Server hosting

- [Host loop](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-server/Program.cs): `BattleRobot-solo/BattleRobot-solo-server/Program.cs`
- [Server session](https://github.com/kaloou/battlerobot-solo/blob/main/BattleRobot-solo/BattleRobot-solo-server/Server.cs): `BattleRobot-solo/BattleRobot-solo-server/Server.cs`

### Other components

- **Player**

## Connections

- Player → Client loop: plays through (evidence: `BattleRobot-solo/BattleRobot-solo-client/Program.cs`)
- Client loop → Console interaction: gets input (evidence: `BattleRobot-solo/BattleRobot-solo-client/Program.cs`)
- Client loop → Client connection: connects via (evidence: `BattleRobot-solo/BattleRobot-solo-client/Program.cs`)
- Client loop → Player transport: exchanges messages (evidence: `BattleRobot-solo/BattleRobot-solo-client/Program.cs`)
- Client loop → Match state: updates and displays (evidence: `BattleRobot-solo/BattleRobot-solo-client/Program.cs`)
- Client connection → Player transport: opens streams (evidence: `BattleRobot-solo/BattleRobot-solo-client/Client.cs`)
- Client connection → Console interaction: configures robot (evidence: `BattleRobot-solo/BattleRobot-solo-client/Client.cs`)
- Player → Host loop: plays through (evidence: `BattleRobot-solo/BattleRobot-solo-server/Program.cs`)
- Host loop → Server session: runs session (evidence: `BattleRobot-solo/BattleRobot-solo-server/Program.cs`)
- Host loop → Match state: creates match (evidence: `BattleRobot-solo/BattleRobot-solo-server/Program.cs`)
- Host loop → Robot combat: creates robot (evidence: `BattleRobot-solo/BattleRobot-solo-server/Program.cs`)
- Host loop → Console interaction: gets input (evidence: `BattleRobot-solo/BattleRobot-solo-server/Program.cs`)
- Server session → Player transport: exchanges messages (evidence: `BattleRobot-solo/BattleRobot-solo-server/Server.cs`)
- Server session → Console interaction: gets actions (evidence: `BattleRobot-solo/BattleRobot-solo-server/Server.cs`)
- Server session → Robot combat: applies actions (evidence: `BattleRobot-solo/BattleRobot-solo-server/Server.cs`)
- Server session → Match state: sets match status (evidence: `BattleRobot-solo/BattleRobot-solo-server/Server.cs`)
- Match state → Robot combat: holds robots (evidence: `BattleRobot-solo/BattleRobot-solo-core/models/Partie.cs`)
