24 lines
494 B
C
24 lines
494 B
C
#ifndef FORZA4_H
|
|
#define FORZA4_H
|
|
|
|
#include <structures.h>
|
|
|
|
#define ORIZONTAL 1
|
|
#define VERTICAL _COLLUMS
|
|
#define DIAGONAL _COLLUMS - 1
|
|
#define DIAGONAL_INV _COLLUMS + 1
|
|
|
|
#define isValid(pos) (pos > 0 && pos / _COLLUMS < _ROWS)
|
|
|
|
// global variable
|
|
static int _ROWS;
|
|
static int _COLLUMS;
|
|
|
|
|
|
void setCollums(int collums);
|
|
int getIndex(int i, int j);
|
|
|
|
int checkWin(tile_t *board, int pos, int rows, int collums);
|
|
int checkWinAll(tile_t *board, int rows, int collums);
|
|
|
|
#endif |