Skip to content

model.py

CDnX edited this page Jun 15, 2017 · 2 revisions

class Model gets two variable when initialized, playerid, and seed.
seed used as seed of TiRandomizer. playerid is not used, and will be removed.

piecedict, speedvar, speedtuples, vartuples.

piecedict

piecedict is dictionary of pieces and its rotation behavior.
0 is blank, and other integer bigger than 0 is block colored with color defined in view.py. note that key '' have dummy tuples

speedvar

speedvar is list of int variables. it handles dropcounter per frame, ARE, Line clear ARE, DAS, Lock Delay, Line Clear Delay, in order.
if you don't understand what it means, find harddrop wiki for more information.

speedtuples

speedtuples is list of tuples. each tuple have two int constants.
first int is level, and second int is speed. speed var will be refreshed to speedvar every frame.

vartuples

vartuples is list of tuples. each tuple have 6 int constants.
first int is level, and other five is ARE, Line Clear ARE, DAS, Lock Delay, Line Clear Delay, in order.

level

level on this game counts up per every one piece. if line is cleared, it counts up per every line it clears.

rotation

you can find what rotation system it uses in here

processor

basically it is generator function. gets input from ctrl module, and process it, and call view module for render. this is very complicated, and many section of it have to be more modulized.

Clone this wiki locally