update
This commit is contained in:
0
configs/config.py
Normal file
0
configs/config.py
Normal file
0
configs/config.yml
Normal file
0
configs/config.yml
Normal file
@@ -9,9 +9,13 @@ class Gender(Enum):
|
||||
|
||||
@dataclass
|
||||
class Avatar:
|
||||
"""
|
||||
NPC的类。
|
||||
包含了这个角色的一切信息。
|
||||
"""
|
||||
name: str
|
||||
id: int
|
||||
brith_month: Month
|
||||
birth_month: Month
|
||||
birth_year: Year
|
||||
age: int
|
||||
gender: Gender
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from enum import Enum
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
class Month(Enum):
|
||||
JANUARY = "January"
|
||||
FEBRUARY = "February"
|
||||
|
||||
14
src/run.py
14
src/run.py
@@ -1 +1,13 @@
|
||||
from src.classes.avatar import Avatar
|
||||
from src.classes.avatar import Avatar, Gender
|
||||
from src.classes.calendar import Month, Year
|
||||
|
||||
avatar = Avatar(
|
||||
name="John Doe",
|
||||
id=1,
|
||||
birth_month=Month.JANUARY,
|
||||
birth_year=Year(2000),
|
||||
age=20,
|
||||
gender=Gender.MALE
|
||||
)
|
||||
|
||||
print(avatar)
|
||||
15
src/world/world.py
Normal file
15
src/world/world.py
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
class World:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def step(self):
|
||||
"""
|
||||
前进一步(每步模拟是一个月时间)
|
||||
结算这个时间内的所有情况。
|
||||
角色行为、世界变化、重大事件、etc。
|
||||
先结算多个角色间互相交互的事件。
|
||||
再去结算单个角色的事件。
|
||||
"""
|
||||
pass
|
||||
Reference in New Issue
Block a user