Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game
- ┣name: string. The name of the game.
- ┣chessboard: dict. Discribe the chessboard.
- ┃┣pic: string. The path of the pic used for the chessboard.
- ┃┣shape: string. "square" or "custom".
- ┃┣chess_pos: string. optional. For type "custom", evaluate the position of chess's pic using the chess's param_pos.
- ┃┃ When evaluating expression, "self" stands for the current chess. Returns a tuple contains x, y.
- ┃┣begin_pos_x: float. optional.
- ┃┣begin_pos_y: float. optional. For type "square", stands for the left-up corner of the using area.
- ┃┣interval_x: float. optional.
- ┃┗interval_y: float. optional. For type "square", stands for the interval of the chess's pic.
- ┣parse: string. Evaluate to parse the user input to get the command for chess logic.
- ┃ When evaluating expression, "i" stands for the input string, "chess_list" stands for a list of all chess.
- ┣chess: dict. Discribe the chess.
- ┃┃ Properties: "chess.param_pos": Tuple[float, ...]. Stands for the params that can determine the pos of the chess.
- ┃┃ "chess.type": string. Stands for the type name of the chess.
- ┃┃ "chess.param": Tuple[Union[int, float, string], ...]. Stands for the floating params for the chess.
- ┃┃ Member function: "chess.changePic(i)" can be called to change pic.
- ┃┃ "chess.suicide()" can be called to remove itself.
- ┃┃ "chess.moveTo(*param_pos)" can be called to move to the specified pos.
- ┃┣pics: list of string. The path of the pic list used for chess.
- ┃┣types: list of type of chess.
- ┃┃┣name: string. name of the type.
- ┃┃┣slots: list of member functions.
- ┃┃┃┣name: string. The name of member function. "chess.name(*args)" will call this function.
- ┃┃┃┗lambda: string. The lambda of the function. "args[n]" stands for the input args when calling this function.
- ┃┃┗pic_init: int. Initial pic chosen for this type.
- ┃┗
- ┗timeline: dict. Discribe the timeline of the game.
- ┣
- symbols allowed in expression:
- + - * / % ** & | ^ == != < <= > >= = += -= *= /= %= &= |= ^= [ ] ( ) . , : if else for in raise
- public function:
- AddChess(type)
- Randint(begin, end)
- Rand()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement