A python library to help with cell machine development
Project description
cellmachine [source]
Key Features
- Import and export these level codes.
- Read and modify levels with these cells.
Installation
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
Quick Examples
import cellmachine as cm
level = cm.Level.from_code("...")
print(level.name) # display the level's name attribute.
BorderType
A class that represents a border type.
Attributes |
---|
Stop |
Wrap |
Delete |
Flip |
BorderType
Stop [source]
Represents the 'Stop' border type. The border acts like a wall, Immovable.
Type:
BorderType
Wrap [source]
Represents the 'Wrap' border type. The border acts like the corresponding cell on the other side of the level.
Type:
BorderType
Delete [source]
Represents the 'Delete' border type. The border acts like a trash cell, any cells pushed into it are destroyed.
Type:
BorderType
Flip [source]
Represents the 'Flip' border type. The border acts like a mirror, any cells pushed into it are flipped.
Type:
Level
Attributes | Methods | Subclasses |
---|---|---|
border | from_code | LevelSize |
name | ||
text |
Level
border [source]
The border type of the level.
Type:
Level
name [source]
The name of the level. Shown in the level editor.
Type:
Level
text [source]
The text of the level. Text to appear while in play / editor mode.
Type:
Level
from_code [source]
Parameters:
code
(str) - The level code string. Supported Formats
Returns:
Level
(Level)
Level
LevelSize [source]
A class to represent a level's size.
Attributes |
---|
width |
height |
size |
x |
y |
area |
Level.LevelSize
width [source]
The width of the level.
Type:
Level.LevelSize
height [source]
The height of the level.
Type:
Level.LevelSize
size [source]
The size of the level.
Type:
Level.LevelSize
x [source]
Alias for width.
Level.LevelSize
y [source]
Alias for height.
Level.LevelSize
area [source]
The area of the level. (width * height)
Type:
Other
Supported Code Formats
The currently supported codes are:
Name | Remake | Latest |
---|---|---|
V1 | Mystic Mod | ⛔️ |
V2 | Mystic Mod | ⛔️ |
V3 | Mystic Mod | ✅ |
Supported Cells
Texture | Name | Description | Mobile |
---|---|---|---|
Generator | Duplicates the cell behind it to the front, if the cell infront is empty or mobile. | ✅ | |
Clockwise Rotator | Rotates all neighbour cells clockwise that are mobile. | ✅ | |
Counter-clockwise Rotator | Rotates all neighbour cells counter-clockwise that are mobile. | ✅ | |
Mover | Moves in the direction its facing, pushes mobile cells. | ✅ | |
Slide | Is only mobile in the direction of the parrallel lines. | ❎ | |
Push | Mobile in all directions. | ✅ | |
Wall | Immobile in all directions. Cannot be rotated. | ⛔️ | |
Enemy | When a cell is moved into the same location as an enemy cell, both cells will be destroyed. | ⛔️ | |
Trash | Destroys any cell pushed into it. | ⛔️ | |
Placeable | The only "cell" which can share a space with another cell. Only cells marked with this can be moved in 'Play' mode. | ⛔️ |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cellmachine-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fed8a1fa738baa693e043aabec0c2a59943781d7ef0bb9d933b78fa609407e0 |
|
MD5 | 9d2ef7474839b20e806c5787dfc54f64 |
|
BLAKE2b-256 | deb058d76e08c4af9743975261b6190c8db1d2ffc53ab5ae3bc3d53baf7c5e7e |