Files
ZiPingEightChar/vendor/tyme4py/culture/star/ten.py
T
moxiaonian d9da4301cd 公众授权版:normal · 1000 次 · 有效期至 2026-12-31
副本编号 LY-20261007-AC63(水印指纹已嵌入)
含 README、.gitignore;排除 .DS_Store / __pycache__ / .pytest_cache
2026-10-07 17:29:52 +08:00

27 lines
678 B
Python

# -*- coding:utf-8 -*-
from __future__ import annotations
from typing import List, Union
from tyme4py import LoopTyme
class TenStar(LoopTyme):
"""十神"""
NAMES: List[str] = ['比肩', '劫财', '食神', '伤官', '偏财', '正财', '七杀', '正官', '偏印', '正印']
"""名称"""
def __init__(self, index_or_name: Union[int, str]):
super().__init__(self.NAMES, index_or_name)
@classmethod
def from_name(cls, name: str) -> TenStar:
return cls(name)
@classmethod
def from_index(cls, index: int) -> TenStar:
return cls(index)
def next(self, n: int) -> TenStar:
return TenStar(self.next_index(n))