v1.1.7 moved board info to board.h

This commit is contained in:
2025-03-30 22:32:56 +03:00
parent 1dc0040fb3
commit fcbeb38ea5
6 changed files with 15 additions and 24 deletions

View File

@@ -1,8 +1,6 @@
#include <stdio.h>
#include "../globals.h"
extern boardInfo brdInfo;
#include "board.h"
void setBoardBorders(char board[][brdInfo.x]) {
for (int i = 0; i < brdInfo.y; i++) {

View File

@@ -1,7 +1,17 @@
#ifndef BOARD_H_
#define BOARD_H_
#include "../globals.h"
typedef struct {
int x;
int y;
} boardInfo;
typedef struct {
int xs;
int xe;
int ys;
int ye;
} playableBoardInfo;
extern boardInfo brdInfo;

View File

@@ -1,16 +0,0 @@
#ifndef GLOBALS_H_
#define GLOBALS_H_
typedef struct {
int x;
int y;
} boardInfo;
typedef struct {
int xs;
int xe;
int ys;
int ye;
} playableBoardInfo;
#endif // GLOBALS_H_

View File

@@ -10,9 +10,8 @@
#include "./utils/utils.h"
#include "./snake/snake.h"
#include "./board/board.h"
#include "globals.h"
const char* VERSION = "1.1.6";
const char* VERSION = "1.1.7";
const char SNAKE_VIS = '#';

View File

@@ -1,7 +1,7 @@
#ifndef SNAKE_H_
#define SNAKE_H_
#include "../globals.h"
#include "../board/board.h"
extern boardInfo brdInfo;

View File

@@ -3,7 +3,7 @@
#include <time.h>
#include "../globals.h"
#include "../board/board.h"
extern boardInfo brdInfo;