Subversion Repositories Kolibri OS

Rev

Rev 5231 | Go to most recent revision | Details | Compare with Previous | 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
 
5231 raandoom 10
// Free board resources
11
void board_delete();
12
 
5229 raandoom 13
// Redraw board and all content (animation will started if needed)
14
void board_redraw();
15
 
16
// Add one tile with 2 or 4 value in a random cell place
17
// Return true if tile added, false - if no more place for tile
18
__u8 board_add_random_tile();
19
 
20
// Check for available moves
21
// Return true if board has moves, false - if not
22
__u8 board_has_moves();
23
 
24
// Get score
25
__u32 board_score();
5232 raandoom 26
__u32 board_highscore();
5229 raandoom 27
 
28
// Try to move all tiles up
29
// Will return true if something moved or false - if not
30
__u8 board_up();
31
 
32
// Try to move all tiles down
33
// Will return true if something moved or false - if not
34
__u8 board_down();
35
 
36
// Try to move all tiles left
37
// Will return true if something moved or false - if not
38
__u8 board_left();
39
 
40
// Try to move all tiles right
41
// Will return true if something moved or false - if not
42
__u8 board_right();
43
 
44
#endif // BOARD_H