Subversion Repositories Kolibri OS

Rev

Rev 5231 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5229 raandoom 1
#ifndef BOARD_H
2
#define BOARD_H
3
 
4
#include "defines.h"
5
#include "cell.h"
6
 
7
// Draw a new board
8
void board_init(rect* r);
9
 
10
// Redraw board and all content (animation will started if needed)
11
void board_redraw();
12
 
13
// Add one tile with 2 or 4 value in a random cell place
14
// Return true if tile added, false - if no more place for tile
15
__u8 board_add_random_tile();
16
 
17
// Check for available moves
18
// Return true if board has moves, false - if not
19
__u8 board_has_moves();
20
 
21
// Get score
22
__u32 board_score();
23
 
24
// Try to move all tiles up
25
// Will return true if something moved or false - if not
26
__u8 board_up();
27
 
28
// Try to move all tiles down
29
// Will return true if something moved or false - if not
30
__u8 board_down();
31
 
32
// Try to move all tiles left
33
// Will return true if something moved or false - if not
34
__u8 board_left();
35
 
36
// Try to move all tiles right
37
// Will return true if something moved or false - if not
38
__u8 board_right();
39
 
40
#endif // BOARD_H