# h-ssiqueira/batalha-naval architecture

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

- Interactive diagram: https://gitdiagram.com/h-ssiqueira/batalha-naval
- Repository: https://github.com/h-ssiqueira/batalha-naval

## Overview

Batalha Naval is a two-player Battleship game for DOS, implemented in x86 assembly. The documented workflow is that both players place five ships, then take turns choosing firing positions; the game presents a winner. Version 2.0 is the final, graphical version, while version 1.0 has some graphical lettering. The README documents the game flow and versions, but no source excerpts were provided, so internal calls and finer implementation details are not asserted.

Main entry points: [`src/Version 2_0.asm`](https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm) (Firing turns)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game versions"]
  node_v1["Version 1.0<br/>[Version 1_0.asm]"]
  node_v2["Version 2.0<br/>[Version 2_0.asm]"]
  node_placement["Ship placement<br/>[Version 2_0.asm]"]
  node_turns["Firing turns<br/>[Version 2_0.asm]"]
  node_winner["Winner screen<br/>[Version 2_0.asm]"]
  node_graphics["Game graphics<br/>[Version 2_0.asm]"]
end

node_players(("Players"))

node_players -->|"place ships"| node_placement
node_placement -->|"then play"| node_turns
node_players -->|"choose shots"| node_turns
node_turns -->|"ends with"| node_winner
node_v2 -->|"includes"| node_graphics

click node_v1 "https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%201_0.asm"
click node_v2 "https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm"
click node_placement "https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm"
click node_turns "https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm"
click node_winner "https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm"
click node_graphics "https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm"

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_v1,node_v2,node_placement,node_turns,node_winner,node_graphics toneBlue
class node_players toneIndigo
```

## Components

### Game versions

- [Version 1.0](https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%201_0.asm): `src/Version 1_0.asm`
- [Version 2.0](https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm): `src/Version 2_0.asm`
- [Ship placement](https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm): `src/Version 2_0.asm`
- [Firing turns](https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm): `src/Version 2_0.asm`
- [Winner screen](https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm): `src/Version 2_0.asm`
- [Game graphics](https://github.com/h-ssiqueira/batalha-naval/blob/master/src/Version%202_0.asm): `src/Version 2_0.asm`

### Other components

- **Players**

## Connections

- Players → Ship placement: place ships (evidence: `README.md`)
- Ship placement → Firing turns: then play (evidence: `README.md`)
- Players → Firing turns: choose shots (evidence: `README.md`)
- Firing turns → Winner screen: ends with (evidence: `README.md`)
- Version 2.0 → Game graphics: includes (evidence: `README.md`)
