Changed type stuff
This commit is contained in:
parent
355c79bac4
commit
c0b357deb2
6 changed files with 65 additions and 50 deletions
32
types.h
32
types.h
|
|
@ -4,14 +4,26 @@
|
|||
#include <stdint.h>
|
||||
#include "config.h"
|
||||
|
||||
typedef int column_t;
|
||||
#if INT_FAST16_MAX == INT_FAST64_MAX
|
||||
typedef int rowsint_t;
|
||||
typedef int columnsint_t;
|
||||
typedef unsigned winint_t;
|
||||
typedef uintmax_t column_t;
|
||||
#else
|
||||
typedef int_fast8_t rowsint_t;
|
||||
typedef int_fast8_t columnsint_t;
|
||||
typedef uint_fast8_t winint_t;
|
||||
typedef uint_fast8_t column_t;
|
||||
#endif
|
||||
|
||||
#define WININT_FORMAT "%3d"
|
||||
|
||||
typedef struct {
|
||||
int player;
|
||||
column_t *height;
|
||||
bool player;
|
||||
rowsint_t *height;
|
||||
column_t *column;
|
||||
uint8_t rows;
|
||||
uint8_t columns;
|
||||
rowsint_t rows;
|
||||
columnsint_t columns;
|
||||
} board_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -26,11 +38,11 @@ typedef struct {
|
|||
} directions_t;
|
||||
|
||||
typedef struct {
|
||||
int total;
|
||||
int horizontal;
|
||||
int vertical;
|
||||
int diagonalUp;
|
||||
int diagonalDown;
|
||||
winint_t total;
|
||||
winint_t horizontal;
|
||||
winint_t vertical;
|
||||
winint_t diagonalUp;
|
||||
winint_t diagonalDown;
|
||||
} wincount_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue