You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
637 B
28 lines
637 B
2 years ago
|
class BlockType:
|
||
|
NONE = 0
|
||
|
STONE = 1
|
||
|
WOOD = 2
|
||
|
GRASS = 3
|
||
|
|
||
|
class Block:
|
||
|
def __init__(self, id: int, durability: int = 0, type: int = BlockType.NONE):
|
||
|
self.id: int = id
|
||
|
self.durability: int = durability
|
||
|
self.type: int = type
|
||
|
|
||
|
|
||
|
class BlockAir(Block):
|
||
|
def __init__(self):
|
||
|
super().__init__(0)
|
||
|
|
||
|
class BlockStone(Block):
|
||
|
def __init__(self):
|
||
|
super().__init__(1, 20, BlockType.STONE)
|
||
|
|
||
|
class BlockDirt(Block):
|
||
|
def __init__(self):
|
||
|
super().__init__(2, 10, BlockType.GRASS)
|
||
|
|
||
|
class BlockGrass(Block):
|
||
|
def __init__(self):
|
||
|
super().__init__(3, 10, BlockType.GRASS)
|