Elaborato_SO/inc/forza4.h

33 lines
666 B
C
Raw Normal View History

#ifndef FORZA4_H
#define FORZA4_H
#include <structures.h>
2023-05-16 16:55:56 +02:00
#define ORIZONTAL 1
#define VERTICAL _COLLUMS
#define DIAGONAL _COLLUMS - 1
#define DIAGONAL_INV _COLLUMS + 1
// global variable
static int _ROWS;
static int _COLLUMS;
2023-05-17 15:04:42 +02:00
static char _TOKEN1;
static char _TOKEN2;
void setCollums(int collums);
2023-05-17 10:42:16 +02:00
void setRows(int rows);
2023-05-23 12:35:25 +02:00
void setTokens(char t1, char t2);
int getIndex(int i, int j);
2023-05-16 11:45:16 +02:00
2023-05-17 15:04:42 +02:00
int checkWin(tile_t *board, int pos);
int checkWinAll(tile_t *board);
2023-05-19 15:21:15 +02:00
int checkMove(tile_t *board, int collums);
2023-05-17 15:04:42 +02:00
void printBoard(tile_t *board);
void printTile(tile_t t);
2023-05-22 17:22:17 +02:00
void insertMove(tile_t *board, int pos, int turn);
int isValid(int pos);
#endif