mirror of
https://github.com/n0remac/game-jam-2020.git
synced 2026-01-31 08:22:12 -06:00
create basic Dungeon and Level skeleton classes
This commit is contained in:
@@ -0,0 +1,37 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
class Dungeon(object):
|
||||||
|
"""
|
||||||
|
Organizes Level objects into an easy to render and path through object.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, level_count: int = 3, size: int = 3) -> None:
|
||||||
|
"""
|
||||||
|
Initializes the Dungeon object.
|
||||||
|
|
||||||
|
:param level_count: The number of Active Levels that should be stored within the Dungeon.
|
||||||
|
:param size: The diameter of the dungeon. Allows for a total of size^2 slots for levels.
|
||||||
|
"""
|
||||||
|
|
||||||
|
self.levels, self.size = level_count, size
|
||||||
|
|
||||||
|
|
||||||
|
class Level(object):
|
||||||
|
"""
|
||||||
|
A 10x10 space holding wall and background sprites, enemies, items and so forth.
|
||||||
|
Should be loaded from
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self,) -> None:
|
||||||
|
self.wallGrid = []
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def load_file(path: str) -> Level:
|
||||||
|
"""
|
||||||
|
Builds a Level from a given file path.
|
||||||
|
|
||||||
|
:param path: Path to the Level file.
|
||||||
|
:return: The new generated Level file.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
Reference in New Issue
Block a user