// ****************************************************************************
//
// Logic 3: Generate next piece
//
// ****************************************************************************

// piece types:
// xx   x     x    x   xx    xx   x
// xx   x     x    xx   xx  xx    x
//      xx   xx    x              x
//                                x
// 1    2    3    4    5    6     7


#include "defines.txt"

random(1,7,piece_type);
//piece_type = 7;
random(1,6,piece_colour);
piece_rotation = 0;

set(rotate_clockwise);
call(7);  // rotate piece


x = 14;
y = 1;
old_x = x;
old_y = y;

//call(5);  // draw piece

cycles_till_next_fall = 4;

return();