35 lines
690 B
C
35 lines
690 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
|
|
|
|
extern tile_t *_BOARD;
|
|
|
|
// global variable
|
|
extern int _ROWS;
|
|
extern int _COLLUMS;
|
|
|
|
extern char _TOKEN1;
|
|
extern char _TOKEN2;
|
|
|
|
void setCollums(int collums);
|
|
void setRows(int rows);
|
|
void setTokens(char t1, char t2);
|
|
int getIndex(int i, int j);
|
|
|
|
int checkWin(tile_t *board, int pos);
|
|
int checkWinAll(tile_t *board);
|
|
int checkMove(tile_t *board, int collums);
|
|
|
|
void printBoard(tile_t *board);
|
|
void printTile(tile_t t);
|
|
void insertMove(tile_t *board, int pos, int turn);
|
|
|
|
int isValid(int pos);
|
|
|
|
#endif |