Browse files

Better explain how to use, dropped that turn either way

  • Loading branch information...
1 parent 9c8dce1 commit d4052a3b800c3db55ed6c41e69f7d80190b7ee59 @tatarize committed Feb 9, 2013
Showing with 48 additions and 1 deletion.
  1. +48 −1
@@ -7,5 +7,52 @@ Click the board side to make the piece go that way.
Click something on the board (eg, the falling piece) to make it turn.
-Turns are currently logged counter clockwise/counter-clockwise depending on the height you clicked at.
+.width controls width of board.
+.height controls height of board.
+.droprate controls initial drop rate.
+.levels [], rows at which levels increases.
+.speedincrease, between [0,1) increase speed each level (default .2)
+0: spin clockwise?
+1: spin counterclockwise?
+2: move right?
+3: move left?
+4: move down.
+5: slam down.
+Feed a position produced by mouse event allows control of game via mouse.
+Click below board, slam.
+Click bottom of board, move down.
+Click right or left edge, move right or left.
+Click something on board, command(0), turn.
+tetris.move(pieceindex, x, y, z, failop)
+Moves peice given by pieceindex (typically 0), by block worth of x,y,z (moving z would push the peice off the board).
+Failop is optional function to be called if the operation collides with other blocks and must abort.
+M is row to be removed counting from bottom.
+tetris.faster() increases speed by speedincrease (default 20%)
+tetris.slower() decrease speed by speedincrease (default 20%)
+tetris.resetSpeed() set drop rate back to initial droprate.
+tetris.clearBoard() remove all peices from the board.
+tetris.setBoard(material) changes board material to material index.
+tetris.setDroplocation(x,y,z) sets drop location for peices to this location.

0 comments on commit d4052a3

Please sign in to comment.