add map
This commit is contained in:
28
tests/test_basic.py
Normal file
28
tests/test_basic.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from src.classes.avatar import Avatar, Gender
|
||||
from src.classes.calendar import Month, Year
|
||||
from src.classes.world import World
|
||||
from src.classes.tile import Map, TileType
|
||||
|
||||
def test_basic():
|
||||
"""
|
||||
测试整个基础代码能不能run起来
|
||||
"""
|
||||
map = Map(width=2, height=2)
|
||||
for x in range(2):
|
||||
for y in range(2):
|
||||
map.create_tile(x, y, TileType.PLAIN)
|
||||
|
||||
world = World(map=map)
|
||||
|
||||
avatar = Avatar(
|
||||
world=world,
|
||||
name="John Doe",
|
||||
id=1,
|
||||
birth_month=Month.JANUARY,
|
||||
birth_year=Year(2000),
|
||||
age=20,
|
||||
gender=Gender.MALE
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user