From 7fb0918148654b2e66047d4f4fe5dbaf3cf1c342 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 6 Apr 2016 11:00:43 +1200 Subject: Reshuffle function order, remove prototypes --- tetris.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/tetris.c b/tetris.c index b768d0d..9942e6a 100644 --- a/tetris.c +++ b/tetris.c @@ -11,16 +11,8 @@ #define TETROMINO_WIDTH 4 #define TETROMINO_HEIGHT 4 #define TETROMINO_AREA (TETROMINO_HEIGHT*TETROMINO_WIDTH) - - #define MIN(a,b) (arotation += direction; + /* FIXME need to handle direction not in [-4, 4] */ if (held->rotation >= 4) held->rotation -= 4; @@ -272,3 +257,13 @@ void main_loop() } } } + +int main() +{ + srand(time(NULL)); + plot_init(); + main_loop(); +} + + + -- cgit v1.1