# jhanavi128/caso_bote architecture

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

- Interactive diagram: https://gitdiagram.com/jhanavi128/caso_bote
- Repository: https://github.com/jhanavi128/caso_bote

## Overview

Caso_Bote is a small interactive Java console game about ferrying the wolf, Little Red Riding Hood, and grapes across a river. The player selects a passenger (or an empty crossing); the game checks that the passenger is beside the boat, moves the boat and passenger, then checks for a loss or win. The game controller owns these rules and coordinates the state objects. Source excerpts show the entry point and runtime calls; the README provides no further capability details.

Main entry points: [`Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/AppJuegoCaperucita.java) (Game controller), [`Caso_Bote/src/pkJuego/Caperucita.java`](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Caperucita.java) (Red state), [`Caso_Bote/src/App.java`](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/App.java) (Java entry point), [`Caso_Bote/src/pkJuego/Lobo.java`](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Lobo.java) (Wolf state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["Java entry point<br/>[App.java]"]
end

subgraph group_gameplay["Game control"]
  node_game["Game controller"]
end

subgraph group_entities["Game state and actions"]
  node_boat["Boat<br/>[Bote.java]"]
  node_observer["Crossing announcer<br/>[Observador.java]"]
  node_wolf["Wolf state<br/>[Lobo.java]"]
  node_red["Red state<br/>[Caperucita.java]"]
  node_grapes["Grapes state<br/>[Uva.java]"]
end

node_player(("Player"))
node_console(("Console"))

node_player -->|"starts game"| node_app
node_app -->|"starts play"| node_game
node_player -.->|"selects moves"| node_console
node_game -->|"reads and prints"| node_console
node_game -->|"checks and moves"| node_boat
node_game -->|"announces crossing"| node_observer
node_game -->|"reads and updates"| node_wolf
node_game -->|"reads and updates"| node_red
node_game -->|"reads and updates"| node_grapes
node_game -->|"invokes eating"| node_wolf
node_game -->|"invokes eaten action"| node_red
node_game -->|"invokes eaten action"| node_grapes
node_game -->|"invokes eating"| node_red

click node_app "https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/App.java"
click node_game "https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/AppJuegoCaperucita.java"
click node_boat "https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Bote.java"
click node_observer "https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Observador.java"
click node_wolf "https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Lobo.java"
click node_red "https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Caperucita.java"
click node_grapes "https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Uva.java"

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_app toneBlue
class node_game toneAmber
class node_boat,node_observer,node_wolf,node_red,node_grapes toneMint
class node_player,node_console toneIndigo
```

## Components

### Application entry

- [Java entry point](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/App.java): `Caso_Bote/src/App.java`

### Game control

- [Game controller](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/AppJuegoCaperucita.java): `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`

### Game state and actions

- [Boat](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Bote.java): `Caso_Bote/src/pkJuego/Bote.java`
- [Crossing announcer](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Observador.java): `Caso_Bote/src/pkJuego/Observador.java`
- [Wolf state](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Lobo.java): `Caso_Bote/src/pkJuego/Lobo.java`
- [Red state](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Caperucita.java): `Caso_Bote/src/pkJuego/Caperucita.java`
- [Grapes state](https://github.com/jhanavi128/caso_bote/blob/main/Caso_Bote/src/pkJuego/Uva.java): `Caso_Bote/src/pkJuego/Uva.java`

### Other components

- **Player**
- **Console**

## Connections

- Player → Java entry point: starts game (evidence: `Caso_Bote/src/App.java`)
- Java entry point → Game controller: starts play (evidence: `Caso_Bote/src/App.java`)
- Player → Console: selects moves
- Game controller → Console: reads and prints (evidence: `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`)
- Game controller → Boat: checks and moves (evidence: `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`)
- Game controller → Crossing announcer: announces crossing (evidence: `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`)
- Game controller → Wolf state: reads and updates (evidence: `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`)
- Game controller → Red state: reads and updates (evidence: `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`)
- Game controller → Grapes state: reads and updates (evidence: `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`)
- Game controller → Wolf state: invokes eating (evidence: `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`)
- Game controller → Red state: invokes eaten action (evidence: `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`)
- Game controller → Grapes state: invokes eaten action (evidence: `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`)
- Game controller → Red state: invokes eating (evidence: `Caso_Bote/src/pkJuego/AppJuegoCaperucita.java`)
