- Import and export these level codes.
- Read and modify levels with these cells.
Python 3.7+ is required
# MacOS / Linux (via Terminal)
python3 -m pip install -U cellmachine
# Windows (via CMD Prompt)
py -3 -m pip install -U cellmachine
import cellmachine as cm
level = cm.Level.from_code("...")
print(level.name) # display the level's name attribute.
A class that represents a border type.
Attributes |
---|
Stop |
Wrap |
Delete |
Flip |
Represents the 'Stop' border type. The border acts like a wall, Immovable.
Type:
Represents the 'Wrap' border type. The border acts like the corresponding cell on the other side of the level.
Type:
Represents the 'Delete' border type. The border acts like a trash cell, any cells pushed into it are destroyed.
Type:
Represents the 'Flip' border type. The border acts like a mirror, any cells pushed into it are flipped.
Type:
Attributes | Methods | Subclasses |
---|---|---|
border | from_code | LevelSize |
name | ||
text | ||
size |
The border type of the level.
Type:
The name of the level. Shown in the level editor.
Type:
The text of the level. Text to appear while in play / editor mode.
Type:
The size of the level.
Type:
Parameters:
code
(str) - The level code string. Supported Formats
Returns:
Level
(Level)
A class to represent a level's size.
Attributes |
---|
width |
height |
size |
x |
y |
area |
The width of the level.
Type:
The height of the level.
Type:
The size of the level.
Type:
Alias for width.
Alias for height.
The area of the level. (width * height)
Type:
The currently supported codes are:
Name | Remake | Latest |
---|---|---|
V1 | Mystic Mod | ⛔️ |
V2 | Mystic Mod | ⛔️ |
V3 | Mystic Mod | ✅ |