# timurkhayrullin/ultimate-antivirus architecture

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

- Interactive diagram: https://gitdiagram.com/timurkhayrullin/ultimate-antivirus
- Repository: https://github.com/timurkhayrullin/ultimate-antivirus

## Overview

Ultimate-Antivirus is a single-file Pygame action game. The player starts it by running the game file, views instructions and a menu, then plays through five levels and a boss fight. The main loop handles input, aiming and firing, enemy waves, and frame updates; gameplay entities and presentation are implemented in that same file. The tree also includes image, font, and instruction resources. Relationships below are limited to calls visible in the excerpts and capabilities stated in the README; unsampled implementation details are not assumed.

Main entry points: [`TimurSummative/KhayrullinTSummative.py`](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py) (Gameplay Loop), [`TimurSummative/resources/player`](https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/player) (Player Assets), [`TimurSummative/resources/enemies`](https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/enemies) (Enemy Assets), [`TimurSummative/resources/items`](https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/items) (Item Assets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flow["Game Flow"]
  node_levels["Levels and Waves"]
  node_game_loop["Gameplay Loop"]
  node_menu["Main Menu"]
end

subgraph group_combat["Combat Systems"]
  node_player["Player"]
  node_projectiles["Player Projectiles"]
  node_enemies["Enemies"]
  node_enemy_projectiles["Enemy Projectiles"]
  node_boss["Boss Fight"]
  node_pickups["Health Pickups"]
end

subgraph group_presentation["Presentation and Assets"]
  node_instructions["Instructions"]
  node_rendering["Screen Rendering"]
  node_player_assets["Player Assets"]
  node_enemy_assets["Enemy Assets"]
  node_item_assets["Item Assets"]
  node_font_assets["Font Assets"]
  node_instruction_assets["Instruction Assets"]
end

node_player_actor(("Player"))
node_pygame["Pygame"]

node_player_actor -->|"starts game"| node_menu
node_menu -.->|"enters gameplay"| node_game_loop
node_game_loop -->|"spawns waves"| node_levels
node_game_loop -->|"fires shots"| node_projectiles
node_game_loop -->|"handles events"| node_pygame
node_game_loop -->|"flips display"| node_rendering
node_enemies -->|"fires shots"| node_enemy_projectiles
node_boss -->|"creates shots"| node_enemy_projectiles
node_pickups -->|"updates against"| node_player
node_instructions -->|"renders text"| node_rendering
node_player -.->|"loads images"| node_player_assets
node_enemies -->|"loads images"| node_enemy_assets
node_projectiles -->|"loads images"| node_player_assets
node_pickups -->|"loads images"| node_item_assets
node_instructions -.->|"uses content"| node_instruction_assets
node_rendering -.->|"uses fonts"| node_font_assets

click node_player "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_projectiles "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_enemies "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_enemy_projectiles "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_boss "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_pickups "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_levels "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_game_loop "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_menu "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_instructions "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_rendering "https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py"
click node_player_assets "https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/player"
click node_enemy_assets "https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/enemies"
click node_item_assets "https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/items"
click node_font_assets "https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/fonts"
click node_instruction_assets "https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/instructions"

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_levels,node_game_loop,node_menu toneBlue
class node_player,node_projectiles,node_enemies,node_enemy_projectiles,node_boss,node_pickups toneAmber
class node_instructions,node_rendering,node_player_assets,node_enemy_assets,node_item_assets,node_font_assets,node_instruction_assets toneMint
class node_player_actor,node_pygame toneIndigo
```

## Components

### Game Flow

- [Levels and Waves](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`
- [Gameplay Loop](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`
- [Main Menu](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`

### Combat Systems

- [Player](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`
- [Player Projectiles](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`
- [Enemies](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`
- [Enemy Projectiles](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`
- [Boss Fight](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`
- [Health Pickups](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`

### Presentation and Assets

- [Instructions](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`
- [Screen Rendering](https://github.com/timurkhayrullin/ultimate-antivirus/blob/master/TimurSummative/KhayrullinTSummative.py): `TimurSummative/KhayrullinTSummative.py`
- [Player Assets](https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/player): `TimurSummative/resources/player`
- [Enemy Assets](https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/enemies): `TimurSummative/resources/enemies`
- [Item Assets](https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/items): `TimurSummative/resources/items`
- [Font Assets](https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/fonts): `TimurSummative/resources/fonts`
- [Instruction Assets](https://github.com/timurkhayrullin/ultimate-antivirus/tree/master/TimurSummative/resources/instructions): `TimurSummative/resources/instructions`

### Other components

- **Player**
- **Pygame**

## Connections

- Player → Main Menu: starts game (evidence: `README.md`)
- Main Menu → Gameplay Loop: enters gameplay (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Gameplay Loop → Levels and Waves: spawns waves (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Gameplay Loop → Player Projectiles: fires shots (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Gameplay Loop → Pygame: handles events (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Gameplay Loop → Screen Rendering: flips display (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Enemies → Enemy Projectiles: fires shots (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Boss Fight → Enemy Projectiles: creates shots (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Health Pickups → Player: updates against (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Instructions → Screen Rendering: renders text (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Player → Player Assets: loads images
- Enemies → Enemy Assets: loads images (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Player Projectiles → Player Assets: loads images (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Health Pickups → Item Assets: loads images (evidence: `TimurSummative/KhayrullinTSummative.py`)
- Instructions → Instruction Assets: uses content
- Screen Rendering → Font Assets: uses fonts
