# muthukrishs2001/hand-cricket architecture

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

- Interactive diagram: https://gitdiagram.com/muthukrishs2001/hand-cricket
- Repository: https://github.com/muthukrishs2001/hand-cricket

## Overview

Hand Cricket is a browser-based game for entering three players, playing a turn-based scoring round, and viewing the resulting totals. The workflow moves from the home screen through team setup and match play to the results screen, with names and scores persisted in browser storage. The README documents the page flow and styling; the sampled game.js excerpt confirms setup storage, scoring, result navigation, and result rendering. Other page implementations were not sampled.

Main entry points: [`team.html`](https://github.com/muthukrishs2001/hand-cricket/blob/main/team.html) (Team entry), [`result.html`](https://github.com/muthukrishs2001/hand-cricket/blob/main/result.html) (Result screen), [`index.css`](https://github.com/muthukrishs2001/hand-cricket/blob/main/index.css) (Page styles), [`game.js`](https://github.com/muthukrishs2001/hand-cricket/blob/main/game.js) (Turn scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Player setup"]
  node_home["Home screen<br/>[index.html]"]
  node_team["Team entry<br/>[team.html]"]
end

subgraph group_play["Match play"]
  node_match["Match screen<br/>[game.html]"]
  node_scoring["Turn scoring<br/>[game.js]"]
  node_storage[("Browser storage")]
end

subgraph group_results["Results"]
  node_result["Result screen<br/>[result.html]"]
  node_rendering["Result rendering<br/>[game.js]"]
end

subgraph group_presentation["Presentation"]
  node_styles["Page styles<br/>[index.css]"]
end

node_player(("Player"))

node_player -->|"opens"| node_home
node_home -->|"navigates"| node_team
node_player -->|"enters names"| node_team
node_team -->|"stores names"| node_storage
node_team -->|"navigates"| node_match
node_match -->|"runs turns"| node_scoring
node_scoring -->|"stores scores"| node_storage
node_storage -->|"loads names"| node_scoring
node_scoring -->|"navigates"| node_result
node_result -->|"renders totals"| node_rendering
node_storage -->|"provides results"| node_rendering
node_player -.->|"views result"| node_result
node_result -->|"returns home"| node_home
node_styles -.->|"styles"| node_home
node_styles -.->|"styles"| node_team
node_styles -.->|"styles"| node_match
node_styles -.->|"styles"| node_result

click node_home "https://github.com/muthukrishs2001/hand-cricket/blob/main/index.html"
click node_team "https://github.com/muthukrishs2001/hand-cricket/blob/main/team.html"
click node_match "https://github.com/muthukrishs2001/hand-cricket/blob/main/game.html"
click node_scoring "https://github.com/muthukrishs2001/hand-cricket/blob/main/game.js"
click node_result "https://github.com/muthukrishs2001/hand-cricket/blob/main/result.html"
click node_rendering "https://github.com/muthukrishs2001/hand-cricket/blob/main/game.js"
click node_styles "https://github.com/muthukrishs2001/hand-cricket/blob/main/index.css"

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_team toneBlue
class node_match,node_scoring,node_storage toneAmber
class node_result,node_rendering toneMint
class node_styles toneRose
class node_player toneIndigo
```

## Components

### Player setup

- [Home screen](https://github.com/muthukrishs2001/hand-cricket/blob/main/index.html): `index.html`
- [Team entry](https://github.com/muthukrishs2001/hand-cricket/blob/main/team.html): `team.html`

### Match play

- [Match screen](https://github.com/muthukrishs2001/hand-cricket/blob/main/game.html): `game.html`
- [Turn scoring](https://github.com/muthukrishs2001/hand-cricket/blob/main/game.js): `game.js`
- **Browser storage**

### Results

- [Result screen](https://github.com/muthukrishs2001/hand-cricket/blob/main/result.html): `result.html`
- [Result rendering](https://github.com/muthukrishs2001/hand-cricket/blob/main/game.js): `game.js`

### Presentation

- [Page styles](https://github.com/muthukrishs2001/hand-cricket/blob/main/index.css): `index.css`

### Other components

- **Player**

## Connections

- Player → Home screen: opens (evidence: `README.md`)
- Home screen → Team entry: navigates (evidence: `README.md`)
- Player → Team entry: enters names (evidence: `README.md`)
- Team entry → Browser storage: stores names
- Team entry → Match screen: navigates (evidence: `README.md`)
- Match screen → Turn scoring: runs turns (evidence: `README.md`)
- Turn scoring → Browser storage: stores scores (evidence: `game.js`)
- Browser storage → Turn scoring: loads names (evidence: `game.js`)
- Turn scoring → Result screen: navigates (evidence: `game.js`)
- Result screen → Result rendering: renders totals (evidence: `README.md`)
- Browser storage → Result rendering: provides results (evidence: `game.js`)
- Player → Result screen: views result (evidence: `README.md`)
- Result screen → Home screen: returns home (evidence: `README.md`)
- Page styles → Home screen: styles (evidence: `README.md`)
- Page styles → Team entry: styles (evidence: `README.md`)
- Page styles → Match screen: styles (evidence: `README.md`)
- Page styles → Result screen: styles (evidence: `README.md`)
