# robbinrss/pokemon architecture

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

- Interactive diagram: https://gitdiagram.com/robbinrss/pokemon
- Repository: https://github.com/robbinrss/pokemon

## Overview

This is a console Pokémon battle game. The user supplies two trainer names; Program creates trainers and starts a battle. Trainers hold Pokémon in Pokéballs, and Pokémon provide type and battle-cry behavior. The battle and arena modules are present, but Battle.cs was not excerpted and the README gives no further detail, so their internal interactions are not asserted. The graph includes only relationships visible in the excerpts; this limits the battle-stage connections.

Main entry points: [`Pokemon/Trainers/Trainer.cs`](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Trainers/Trainer.cs) (Trainer), [`Pokemon/Pokemonclasses/Pokemon.cs`](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/Pokemon.cs) (Pokémon base), [`Pokemon/Pokemonclasses/PokemonType.cs`](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/PokemonType.cs) (Pokémon types), [`Pokemon/Program.cs`](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Program.cs) (Program)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Game entry"]
  node_program["Program<br/>[Program.cs]"]
  node_trainer["Trainer<br/>[Trainer.cs]"]
end

subgraph group_battle["Battle system"]
  node_battle["Battle<br/>[Battle.cs]"]
  node_arena["Arena counters<br/>[Arena.cs]"]
end

subgraph group_pokemon["Pokémon domain"]
  node_pokeball["Pokéball<br/>[Pokeball.cs]"]
  node_pokemon_base["Pokémon base<br/>[Pokemon.cs]"]
  node_charmander["Charmander<br/>[Charmander.cs]"]
  node_squirtle["Squirtle<br/>[Squirtle.cs]"]
  node_bulbasaur["Bulbasaur<br/>[Bulbasaur.cs]"]
  node_pokemon_type["Pokémon types<br/>[PokemonType.cs]"]
end

node_user(("Console user"))

node_user -->|"enters names"| node_program
node_program -->|"creates"| node_trainer
node_program -->|"starts battle"| node_battle
node_trainer -->|"creates and uses"| node_pokeball
node_trainer -->|"creates"| node_charmander
node_trainer -->|"creates"| node_squirtle
node_trainer -->|"creates"| node_bulbasaur
node_pokeball -->|"calls battle cry"| node_pokemon_base
node_charmander -->|"extends"| node_pokemon_base
node_squirtle -->|"extends"| node_pokemon_base
node_bulbasaur -->|"extends"| node_pokemon_base
node_pokemon_base -->|"uses"| node_pokemon_type
node_charmander -->|"sets type"| node_pokemon_type
node_squirtle -->|"sets type"| node_pokemon_type
node_bulbasaur -->|"sets type"| node_pokemon_type

click node_program "https://github.com/robbinrss/pokemon/blob/master/Pokemon/Program.cs"
click node_trainer "https://github.com/robbinrss/pokemon/blob/master/Pokemon/Trainers/Trainer.cs"
click node_battle "https://github.com/robbinrss/pokemon/blob/master/Pokemon/BattleSystem/Battle.cs"
click node_arena "https://github.com/robbinrss/pokemon/blob/master/Pokemon/BattleSystem/Arena.cs"
click node_pokeball "https://github.com/robbinrss/pokemon/blob/master/Pokemon/Items/Pokeball.cs"
click node_pokemon_base "https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/Pokemon.cs"
click node_charmander "https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/Charmander.cs"
click node_squirtle "https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/Squirtle.cs"
click node_bulbasaur "https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/Bulbasaur.cs"
click node_pokemon_type "https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/PokemonType.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_program,node_trainer,node_user toneBlue
class node_battle,node_arena toneAmber
class node_pokeball,node_pokemon_base,node_charmander,node_squirtle,node_bulbasaur,node_pokemon_type toneMint
```

## Components

### Game entry

- [Program](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Program.cs): `Pokemon/Program.cs`
- [Trainer](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Trainers/Trainer.cs): `Pokemon/Trainers/Trainer.cs`

### Battle system

- [Battle](https://github.com/robbinrss/pokemon/blob/master/Pokemon/BattleSystem/Battle.cs): `Pokemon/BattleSystem/Battle.cs`
- [Arena counters](https://github.com/robbinrss/pokemon/blob/master/Pokemon/BattleSystem/Arena.cs): `Pokemon/BattleSystem/Arena.cs`

### Pokémon domain

- [Pokéball](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Items/Pokeball.cs): `Pokemon/Items/Pokeball.cs`
- [Pokémon base](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/Pokemon.cs): `Pokemon/Pokemonclasses/Pokemon.cs`
- [Charmander](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/Charmander.cs): `Pokemon/Pokemonclasses/Charmander.cs`
- [Squirtle](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/Squirtle.cs): `Pokemon/Pokemonclasses/Squirtle.cs`
- [Bulbasaur](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/Bulbasaur.cs): `Pokemon/Pokemonclasses/Bulbasaur.cs`
- [Pokémon types](https://github.com/robbinrss/pokemon/blob/master/Pokemon/Pokemonclasses/PokemonType.cs): `Pokemon/Pokemonclasses/PokemonType.cs`

### Other components

- **Console user**

## Connections

- Console user → Program: enters names (evidence: `Pokemon/Program.cs`)
- Program → Trainer: creates (evidence: `Pokemon/Program.cs`)
- Program → Battle: starts battle (evidence: `Pokemon/Program.cs`)
- Trainer → Pokéball: creates and uses (evidence: `Pokemon/Trainers/Trainer.cs`)
- Trainer → Charmander: creates (evidence: `Pokemon/Trainers/Trainer.cs`)
- Trainer → Squirtle: creates (evidence: `Pokemon/Trainers/Trainer.cs`)
- Trainer → Bulbasaur: creates (evidence: `Pokemon/Trainers/Trainer.cs`)
- Pokéball → Pokémon base: calls battle cry (evidence: `Pokemon/Items/Pokeball.cs`)
- Charmander → Pokémon base: extends (evidence: `Pokemon/Pokemonclasses/Charmander.cs`)
- Squirtle → Pokémon base: extends (evidence: `Pokemon/Pokemonclasses/Squirtle.cs`)
- Bulbasaur → Pokémon base: extends (evidence: `Pokemon/Pokemonclasses/Bulbasaur.cs`)
- Pokémon base → Pokémon types: uses (evidence: `Pokemon/Pokemonclasses/Pokemon.cs`)
- Charmander → Pokémon types: sets type (evidence: `Pokemon/Pokemonclasses/Charmander.cs`)
- Squirtle → Pokémon types: sets type (evidence: `Pokemon/Pokemonclasses/Squirtle.cs`)
- Bulbasaur → Pokémon types: sets type (evidence: `Pokemon/Pokemonclasses/Bulbasaur.cs`)
