This commit is contained in:
bridge
2025-08-18 23:58:44 +08:00
parent 58e485806a
commit b309b2749c
6 changed files with 35 additions and 2 deletions

0
configs/config.py Normal file
View File

0
configs/config.yml Normal file
View File

View 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

View File

@@ -1,5 +1,7 @@
from enum import Enum
from dataclasses import dataclass
class Month(Enum):
JANUARY = "January"
FEBRUARY = "February"

View File

@@ -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
View File

@@ -0,0 +1,15 @@
class World:
def __init__(self):
pass
def step(self):
"""
前进一步(每步模拟是一个月时间)
结算这个时间内的所有情况。
角色行为、世界变化、重大事件、etc。
先结算多个角色间互相交互的事件。
再去结算单个角色的事件。
"""
pass