Skip to content

Latest commit

 

History

History
217 lines (154 loc) · 7.59 KB

README.md

File metadata and controls

217 lines (154 loc) · 7.59 KB

cellmachine

Key Features

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

[source]

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

[source]

Attributes Methods Subclasses
border from_code LevelSize
name
text
size

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 size

[source]

The size of the level.

Type:


Level from_code

[source]

Parameters:

Returns:


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. ⛔️