File: game_types.py

package info (click to toggle)
lightyears 1.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,804 kB
  • sloc: python: 5,532; sh: 39; makefile: 6
file content (30 lines) | stat: -rw-r--r-- 1,034 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
# 20,000 Light Years Into Space
# This game is licensed under GPL v2, and copyright (C) Jack Whitham 2006-21.
#

import pygame
import typing

from typing import List, Dict, Tuple, Union, Optional
from .primitives import MenuCommand

SurfaceType = pygame.surface.Surface
Colour = Tuple[int, int, int]
Colour4 = Tuple[int, int, int, int]
BarMeterStatTuple = Tuple[int, Colour, int, Colour]
StatTuple = Tuple[Optional[Colour], Optional[int], Union[BarMeterStatTuple, str]]
SurfacePosition = Tuple[int, int]
FloatSurfacePosition = Tuple[float, float]
GridPosition = Tuple[int, int]
FloatGridPosition = Tuple[float, float]
RectType = pygame.rect.Rect
UpdateAreaMethod = typing.Callable[[RectType], None]
MenuItem = Tuple[Optional[MenuCommand], Optional[str], List[int]]
ClockType = typing.Any
ControlRectType = Tuple[MenuCommand, RectType]
NextParticleType = Tuple[FloatSurfacePosition, Colour4]
FloatGridLine = Tuple[FloatGridPosition, FloatGridPosition]
GridLine = Tuple[GridPosition, GridPosition]
VersionType = Tuple[int, int, int]