src   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 20
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 0
1
from typing import Tuple
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
3
import pygame
4
5
from .functions.loaders import load_sprites_from_dir
6
7
pygame.init()
0 ignored issues
show
Bug introduced by
The Module pygame does not seem to have a member named init.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
8
9
WIDTH: int = 960
10
HEIGHT: int = 720
11
SCREEN_SIZE: Tuple[int, int] = (WIDTH, HEIGHT)
12
13
HALF_WIDTH: int = WIDTH // 2
14
HALF_HEIGHT: int = HEIGHT // 2
15
VIEWPORT_SIZE: Tuple[int, int] = (HALF_WIDTH, HALF_HEIGHT)
16
17
FPS_LIMIT: int = 60
18
TITLE: str = "Tile Scrolling Platformer"
19
20
ASSETS_FOLDER: str = 'assets'
21
TEXTURES_FOLDER: str = f'{ASSETS_FOLDER}/textures'
22
23
screen: pygame.display = pygame.display.set_mode(SCREEN_SIZE)
24
viewport: pygame.Surface = pygame.Surface(VIEWPORT_SIZE)
25
26
pygame.display.set_caption(TITLE)
27
icon: pygame.Surface = pygame.image.load("assets/icon.png").convert_alpha()
28
pygame.display.set_icon(icon)
29