apple2048/apple2048/apple2048.c

35 lines
483 B
C
Raw Normal View History

/*
* File: apple2048.c
* Author: Jeremy Rand
* Date: July 23, 2014
*
* This file contains the entry point for the 2048 game.
*/
2014-07-23 16:28:10 +00:00
2014-07-25 19:55:41 +00:00
#include "anim.h"
2014-07-23 16:28:10 +00:00
#include "game.h"
2014-07-25 19:55:41 +00:00
#include "ui.h"
2014-07-24 05:31:37 +00:00
2014-07-23 13:20:45 +00:00
int main(void)
{
2014-07-25 19:55:41 +00:00
initAnimations();
printInstructions();
2014-07-24 05:31:37 +00:00
newGame();
2014-07-23 16:28:10 +00:00
while (true) {
printBoard();
if (isGameWon())
gameWon();
else if (isGameLost())
2014-07-23 16:28:10 +00:00
gameLost();
else
handleNextEvent();
2014-07-23 13:20:45 +00:00
}
2014-07-23 16:28:10 +00:00
2014-07-23 13:20:45 +00:00
return 0;
}