41 lines
738 B
C
41 lines
738 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(int pos);
|
|
int checkWinAll();
|
|
int checkMove(int collums);
|
|
|
|
void printBoard();
|
|
void printTile(tile_t t);
|
|
void insertMove(int pos, int turn);
|
|
|
|
int isValid(int pos);
|
|
|
|
#endif
|
|
|
|
/************************************
|
|
*VR471576
|
|
*Lorenzo Bianchi
|
|
*16/06/2023
|
|
*************************************/ |