# amoussa-hub/6takes architecture

> Architecture diagram of the GitHub repository amoussa-hub/6takes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amoussa-hub/6takes
- Repository: https://github.com/amoussa-hub/6takes

## Overview

6Takes is a Java Swing card game with solo and multiplayer entry points. The evidenced solo flow runs from the home screen through player setup and timed card selection, resolves plays against four piles, updates scores, and presents final rankings. The multiplayer lobby and socket server are documented by their source layout, but their integration is not established by the excerpts; server-to-client message formatting is visible. Some UI and model relationships are supported by the SOURCE INDEX rather than full excerpts.

Main entry points: [`src/fr/amoussa/SixTakes/Solo/Model/Game.java`](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/Game.java) (Game rules), [`src/fr/amoussa/SixTakes/Solo/View/GameBoard.java`](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/GameBoard.java) (Game board), [`src/fr/amoussa/SixTakes/Solo/View/Accueil.java`](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/Accueil.java) (Home screen), [`src/fr/amoussa/SixTakes/Solo/View/GameFen.java`](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/GameFen.java) (Game window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_solo_ui["Solo interface"]
  node_app["Application entry<br/>[App.java]"]
  node_home["Home screen<br/>[Accueil.java]"]
  node_home_actions["Menu actions"]
  node_player_setup["Player setup"]
  node_game_window["Game window<br/>[GameFen.java]"]
  node_game_board["Game board<br/>[GameBoard.java]"]
  node_pause["Pause dialog<br/>[PauseFen.java]"]
  node_results["Final results<br/>[ResultFrame.java]"]
end

subgraph group_solo_game["Solo game"]
  node_cards["Cards<br/>[Card.java]"]
  node_deck_actions["Card selection<br/>[DeckListener.java]"]
  node_game["Game rules<br/>[Game.java]"]
  node_player_state["Player state<br/>[Player.java]"]
  node_round_timer["Round timer<br/>[Round.java]"]
  node_fold_model["Pile state<br/>[FoldModel.java]"]
  node_fold_choice["Pile selection<br/>[FoldSelection.java]"]
  node_fold_view["Pile display<br/>[Fold.java]"]
  node_fold_actions["Pile actions<br/>[FoldListener.java]"]
end

subgraph group_network["Multiplayer networking"]
  node_multi_lobby["Multiplayer lobby<br/>[Lobby.java]"]
  node_server["Game server<br/>[GameServer.java]"]
  node_client["Network client<br/>[Client.java]"]
  node_messages["Message format"]
end

subgraph group_shared["Shared presentation"]
  node_icons["Image resources<br/>[Icone.java]"]
end

node_player(("Player"))

node_app -->|"opens"| node_home
node_home -->|"registers"| node_home_actions
node_home_actions -->|"opens solo setup"| node_player_setup
node_home_actions -->|"opens lobby"| node_multi_lobby
node_player_setup -->|"starts game"| node_game_window
node_game_window -->|"creates"| node_game
node_game_window -->|"constructs"| node_game_board
node_game -->|"renders state"| node_game_board
node_game -->|"creates and updates"| node_player_state
node_game -->|"updates piles"| node_fold_model
node_game -->|"deals and resolves"| node_cards
node_game -->|"schedules"| node_round_timer
node_round_timer -->|"requests plays"| node_game
node_game_board -->|"renders"| node_cards
node_player_state -->|"attaches listener"| node_deck_actions
node_deck_actions -->|"sets selection"| node_player_state
node_game_board -.->|"creates piles"| node_fold_view
node_fold_view -->|"registers listener"| node_fold_actions
node_game -->|"reads selection"| node_fold_actions
node_game -->|"schedules fallback choice"| node_fold_choice
node_game_board -->|"opens"| node_pause
node_game -->|"shows final scores"| node_results
node_results -->|"returns to menu"| node_home
node_client -->|"uses format"| node_messages
node_player -->|"starts play"| node_home
node_home -->|"loads artwork"| node_icons

click node_app "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/App.java"
click node_home "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/Accueil.java"
click node_player_setup "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/FormNumberPlayer.java"
click node_game_window "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/GameFen.java"
click node_game_board "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/GameBoard.java"
click node_cards "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/Card.java"
click node_deck_actions "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Controller/DeckListener.java"
click node_game "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/Game.java"
click node_player_state "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/Player.java"
click node_round_timer "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/Round.java"
click node_fold_model "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/FoldModel.java"
click node_fold_choice "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/FoldSelection.java"
click node_fold_view "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/Fold.java"
click node_fold_actions "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Controller/FoldListener.java"
click node_pause "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/PauseFen.java"
click node_results "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/ResultFrame.java"
click node_multi_lobby "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Multijoueur/View/Lobby.java"
click node_server "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Server/GameServer.java"
click node_client "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Server/Client.java"
click node_messages "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Server/FormattedMessage.java"
click node_icons "https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Utils/Icone.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,node_home,node_home_actions,node_player_setup,node_game_window,node_game_board,node_pause,node_results toneBlue
class node_cards,node_deck_actions,node_game,node_player_state,node_round_timer,node_fold_model,node_fold_choice,node_fold_view,node_fold_actions toneAmber
class node_multi_lobby,node_server,node_client,node_messages toneMint
class node_icons toneRose
class node_player toneIndigo
```

## Components

### Solo interface

- [Application entry](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/App.java): `src/fr/amoussa/SixTakes/App.java`
- [Home screen](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/Accueil.java): `src/fr/amoussa/SixTakes/Solo/View/Accueil.java`
- **Menu actions**
- [Player setup](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/FormNumberPlayer.java): `src/fr/amoussa/SixTakes/Solo/View/FormNumberPlayer.java`
- [Game window](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/GameFen.java): `src/fr/amoussa/SixTakes/Solo/View/GameFen.java`
- [Game board](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/GameBoard.java): `src/fr/amoussa/SixTakes/Solo/View/GameBoard.java`
- [Pause dialog](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/PauseFen.java): `src/fr/amoussa/SixTakes/Solo/View/PauseFen.java`
- [Final results](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/ResultFrame.java): `src/fr/amoussa/SixTakes/Solo/View/ResultFrame.java`

### Solo game

- [Cards](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/Card.java): `src/fr/amoussa/SixTakes/Solo/View/Card.java`
- [Card selection](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Controller/DeckListener.java): `src/fr/amoussa/SixTakes/Solo/Controller/DeckListener.java`
- [Game rules](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/Game.java): `src/fr/amoussa/SixTakes/Solo/Model/Game.java`
- [Player state](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/Player.java): `src/fr/amoussa/SixTakes/Solo/Model/Player.java`
- [Round timer](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/Round.java): `src/fr/amoussa/SixTakes/Solo/Model/Round.java`
- [Pile state](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/FoldModel.java): `src/fr/amoussa/SixTakes/Solo/Model/FoldModel.java`
- [Pile selection](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Model/FoldSelection.java): `src/fr/amoussa/SixTakes/Solo/Model/FoldSelection.java`
- [Pile display](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/View/Fold.java): `src/fr/amoussa/SixTakes/Solo/View/Fold.java`
- [Pile actions](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Solo/Controller/FoldListener.java): `src/fr/amoussa/SixTakes/Solo/Controller/FoldListener.java`

### Multiplayer networking

- [Multiplayer lobby](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Multijoueur/View/Lobby.java): `src/fr/amoussa/SixTakes/Multijoueur/View/Lobby.java`
- [Game server](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Server/GameServer.java): `src/fr/amoussa/SixTakes/Server/GameServer.java`
- [Network client](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Server/Client.java): `src/fr/amoussa/SixTakes/Server/Client.java`
- [Message format](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Server/FormattedMessage.java): `src/fr/amoussa/SixTakes/Server/FormattedMessage.java`

### Shared presentation

- [Image resources](https://github.com/amoussa-hub/6takes/blob/main/src/fr/amoussa/SixTakes/Utils/Icone.java): `src/fr/amoussa/SixTakes/Utils/Icone.java`

### Other components

- **Player**

## Connections

- Application entry → Home screen: opens (evidence: `src/fr/amoussa/SixTakes/App.java`)
- Home screen → Menu actions: registers (evidence: `src/fr/amoussa/SixTakes/Solo/View/Accueil.java`)
- Menu actions → Player setup: opens solo setup
- Menu actions → Multiplayer lobby: opens lobby
- Player setup → Game window: starts game (evidence: `src/fr/amoussa/SixTakes/Solo/View/FormNumberPlayer.java`)
- Game window → Game rules: creates (evidence: `src/fr/amoussa/SixTakes/Solo/View/GameFen.java`)
- Game window → Game board: constructs (evidence: `src/fr/amoussa/SixTakes/Solo/View/GameFen.java`)
- Game rules → Game board: renders state (evidence: `src/fr/amoussa/SixTakes/Solo/Model/Game.java`)
- Game rules → Player state: creates and updates (evidence: `src/fr/amoussa/SixTakes/Solo/Model/Game.java`)
- Game rules → Pile state: updates piles (evidence: `src/fr/amoussa/SixTakes/Solo/Model/Game.java`)
- Game rules → Cards: deals and resolves (evidence: `src/fr/amoussa/SixTakes/Solo/Model/Game.java`)
- Game rules → Round timer: schedules (evidence: `src/fr/amoussa/SixTakes/Solo/Model/Game.java`)
- Round timer → Game rules: requests plays (evidence: `src/fr/amoussa/SixTakes/Solo/Model/Round.java`)
- Game board → Cards: renders (evidence: `src/fr/amoussa/SixTakes/Solo/View/GameBoard.java`)
- Player state → Card selection: attaches listener (evidence: `src/fr/amoussa/SixTakes/Solo/Model/Player.java`)
- Card selection → Player state: sets selection (evidence: `src/fr/amoussa/SixTakes/Solo/Controller/DeckListener.java`)
- Game board → Pile display: creates piles (evidence: `src/fr/amoussa/SixTakes/Solo/View/GameBoard.java`)
- Pile display → Pile actions: registers listener (evidence: `src/fr/amoussa/SixTakes/Solo/View/Fold.java`)
- Game rules → Pile actions: reads selection (evidence: `src/fr/amoussa/SixTakes/Solo/Model/Game.java`)
- Game rules → Pile selection: schedules fallback choice (evidence: `src/fr/amoussa/SixTakes/Solo/Model/Game.java`)
- Game board → Pause dialog: opens (evidence: `src/fr/amoussa/SixTakes/Solo/View/GameBoard.java`)
- Game rules → Final results: shows final scores (evidence: `src/fr/amoussa/SixTakes/Solo/Model/Game.java`)
- Final results → Home screen: returns to menu (evidence: `src/fr/amoussa/SixTakes/Solo/View/ResultFrame.java`)
- Network client → Message format: uses format (evidence: `src/fr/amoussa/SixTakes/Server/Client.java`)
- Player → Home screen: starts play (evidence: `README.md`)
- Home screen → Image resources: loads artwork (evidence: `src/fr/amoussa/SixTakes/Solo/View/Accueil.java`)
