# joel-lo/games- architecture

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

- Interactive diagram: https://gitdiagram.com/joel-lo/games-
- Repository: https://github.com/joel-lo/games-

## Overview

This repository is a browser-based arcade collection: visitors enter through a home page, reach a game-selection page, and play standalone games. The game scripts handle input, simulation, scoring, and display; Pac-Man additionally separates its controller from player and ghost logic, while Hangman keeps its word-and-hint data separate. The tree and excerpts support these game components, but no README or HTML excerpts were provided, so navigation links between pages are unverified. Other unsampled game implementations are represented by their exact script paths.

Main entry points: [`Selection.html`](https://github.com/joel-lo/games-/blob/main/Selection.html) (Game selection), [`Pacman.html`](https://github.com/joel-lo/games-/blob/main/Pacman.html) (Pac-Man page), [`Pacman - game.js`](https://github.com/joel-lo/games-/blob/main/Pacman%20-%20game.js) (Pac-Man controller), [`index.html`](https://github.com/joel-lo/games-/blob/main/index.html) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Arcade portal"]
  node_home["Home page<br/>[index.html]"]
  node_startgate["Start gate<br/>[index.js]"]
  node_selection["Game selection<br/>[Selection.html]"]
end

subgraph group_arcade["Standalone games"]
  node_dino_page["Dinosaur page<br/>[Dinosaur.html]"]
  node_dino_game["Dinosaur game<br/>[Dinosaur.js]"]
  node_flappy_page["Flappy Bird page<br/>[Flappy Bird.html]"]
  node_flappy_game["Flappy Bird game<br/>[Flappy Bird.js]"]
  node_snake_page["Snake page<br/>[Snake Game.html]"]
  node_snake_game["Snake game<br/>[Snake Game.js]"]
  node_snake_scores[("Snake high scores<br/>[Snake Game.js]")]
  node_tetris_page["Tetris page<br/>[Tetris.html]"]
  node_tetris_game["Tetris game<br/>[Tetris.js]"]
end

subgraph group_pacman["Pac-Man"]
  node_pacman_page["Pac-Man page<br/>[Pacman.html]"]
  node_pacman_controller["Pac-Man controller<br/>[Pacman - game.js]"]
  node_pacman_player["Pac-Man player logic<br/>[Pacman - pacman.js]"]
  node_pacman_ghost["Ghost logic<br/>[Pacman - ghost.js]"]
  node_pacman_legacy["Pac-Man implementation<br/>[Pacman.js]"]
end

subgraph group_hangman["Hangman"]
  node_hangman_page["Hangman page<br/>[Hangman.html]"]
  node_hangman_game["Hangman game<br/>[Hangman.js]"]
  node_word_data["Word and hint list<br/>[Hangman-List.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"clicks start"| node_startgate
node_home -.->|"loads script"| node_startgate
node_home -.->|"opens selection"| node_selection
node_selection -.->|"opens game"| node_dino_page
node_selection -.->|"opens game"| node_flappy_page
node_selection -.->|"opens game"| node_snake_page
node_selection -.->|"opens game"| node_tetris_page
node_selection -.->|"opens game"| node_pacman_page
node_selection -.->|"opens game"| node_hangman_page
node_dino_page -.->|"loads game"| node_dino_game
node_flappy_page -.->|"loads game"| node_flappy_game
node_snake_page -.->|"loads game"| node_snake_game
node_snake_game -->|"reads and writes"| node_snake_scores
node_tetris_page -.->|"loads game"| node_tetris_game
node_pacman_page -.->|"loads controller"| node_pacman_controller
node_pacman_controller -->|"creates and updates"| node_pacman_player
node_pacman_controller -->|"creates and updates"| node_pacman_ghost
node_pacman_page -.->|"loads implementation"| node_pacman_legacy
node_hangman_page -.->|"loads game"| node_hangman_game
node_hangman_game -->|"chooses word"| node_word_data

click node_home "https://github.com/joel-lo/games-/blob/main/index.html"
click node_startgate "https://github.com/joel-lo/games-/blob/main/index.js"
click node_selection "https://github.com/joel-lo/games-/blob/main/Selection.html"
click node_dino_page "https://github.com/joel-lo/games-/blob/main/Dinosaur.html"
click node_dino_game "https://github.com/joel-lo/games-/blob/main/Dinosaur.js"
click node_flappy_page "https://github.com/joel-lo/games-/blob/main/Flappy%20Bird.html"
click node_flappy_game "https://github.com/joel-lo/games-/blob/main/Flappy%20Bird.js"
click node_snake_page "https://github.com/joel-lo/games-/blob/main/Snake%20Game.html"
click node_snake_game "https://github.com/joel-lo/games-/blob/main/Snake%20Game.js"
click node_snake_scores "https://github.com/joel-lo/games-/blob/main/Snake%20Game.js"
click node_tetris_page "https://github.com/joel-lo/games-/blob/main/Tetris.html"
click node_tetris_game "https://github.com/joel-lo/games-/blob/main/Tetris.js"
click node_pacman_page "https://github.com/joel-lo/games-/blob/main/Pacman.html"
click node_pacman_controller "https://github.com/joel-lo/games-/blob/main/Pacman%20-%20game.js"
click node_pacman_player "https://github.com/joel-lo/games-/blob/main/Pacman%20-%20pacman.js"
click node_pacman_ghost "https://github.com/joel-lo/games-/blob/main/Pacman%20-%20ghost.js"
click node_pacman_legacy "https://github.com/joel-lo/games-/blob/main/Pacman.js"
click node_hangman_page "https://github.com/joel-lo/games-/blob/main/Hangman.html"
click node_hangman_game "https://github.com/joel-lo/games-/blob/main/Hangman.js"
click node_word_data "https://github.com/joel-lo/games-/blob/main/Hangman-List.js"

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_home,node_startgate,node_selection toneBlue
class node_dino_page,node_dino_game,node_flappy_page,node_flappy_game,node_snake_page,node_snake_game,node_snake_scores,node_tetris_page,node_tetris_game toneAmber
class node_pacman_page,node_pacman_controller,node_pacman_player,node_pacman_ghost,node_pacman_legacy toneMint
class node_hangman_page,node_hangman_game,node_word_data toneRose
class node_visitor toneIndigo
```

## Components

### Arcade portal

- [Home page](https://github.com/joel-lo/games-/blob/main/index.html): `index.html`
- [Start gate](https://github.com/joel-lo/games-/blob/main/index.js): `index.js`
- [Game selection](https://github.com/joel-lo/games-/blob/main/Selection.html): `Selection.html`

### Standalone games

- [Dinosaur page](https://github.com/joel-lo/games-/blob/main/Dinosaur.html): `Dinosaur.html`
- [Dinosaur game](https://github.com/joel-lo/games-/blob/main/Dinosaur.js): `Dinosaur.js`
- [Flappy Bird page](https://github.com/joel-lo/games-/blob/main/Flappy%20Bird.html): `Flappy Bird.html`
- [Flappy Bird game](https://github.com/joel-lo/games-/blob/main/Flappy%20Bird.js): `Flappy Bird.js`
- [Snake page](https://github.com/joel-lo/games-/blob/main/Snake%20Game.html): `Snake Game.html`
- [Snake game](https://github.com/joel-lo/games-/blob/main/Snake%20Game.js): `Snake Game.js`
- [Snake high scores](https://github.com/joel-lo/games-/blob/main/Snake%20Game.js): `Snake Game.js`
- [Tetris page](https://github.com/joel-lo/games-/blob/main/Tetris.html): `Tetris.html`
- [Tetris game](https://github.com/joel-lo/games-/blob/main/Tetris.js): `Tetris.js`

### Pac-Man

- [Pac-Man page](https://github.com/joel-lo/games-/blob/main/Pacman.html): `Pacman.html`
- [Pac-Man controller](https://github.com/joel-lo/games-/blob/main/Pacman%20-%20game.js): `Pacman - game.js`
- [Pac-Man player logic](https://github.com/joel-lo/games-/blob/main/Pacman%20-%20pacman.js): `Pacman - pacman.js`
- [Ghost logic](https://github.com/joel-lo/games-/blob/main/Pacman%20-%20ghost.js): `Pacman - ghost.js`
- [Pac-Man implementation](https://github.com/joel-lo/games-/blob/main/Pacman.js): `Pacman.js`

### Hangman

- [Hangman page](https://github.com/joel-lo/games-/blob/main/Hangman.html): `Hangman.html`
- [Hangman game](https://github.com/joel-lo/games-/blob/main/Hangman.js): `Hangman.js`
- [Word and hint list](https://github.com/joel-lo/games-/blob/main/Hangman-List.js): `Hangman-List.js`

### Other components

- **Visitor**

## Connections

- Visitor → Start gate: clicks start (evidence: `index.js`)
- Home page → Start gate: loads script
- Home page → Game selection: opens selection
- Game selection → Dinosaur page: opens game
- Game selection → Flappy Bird page: opens game
- Game selection → Snake page: opens game
- Game selection → Tetris page: opens game
- Game selection → Pac-Man page: opens game
- Game selection → Hangman page: opens game
- Dinosaur page → Dinosaur game: loads game
- Flappy Bird page → Flappy Bird game: loads game
- Snake page → Snake game: loads game
- Snake game → Snake high scores: reads and writes (evidence: `Snake Game.js`)
- Tetris page → Tetris game: loads game
- Pac-Man page → Pac-Man controller: loads controller
- Pac-Man controller → Pac-Man player logic: creates and updates (evidence: `Pacman - game.js`)
- Pac-Man controller → Ghost logic: creates and updates (evidence: `Pacman - game.js`)
- Pac-Man page → Pac-Man implementation: loads implementation
- Hangman page → Hangman game: loads game
- Hangman game → Word and hint list: chooses word (evidence: `Hangman.js`)
