snake-pp/include/config.h
jonny_jr9 061b4431c7 Implement game.c, food.c and map.c
- Implemented the functions in the above files
 - game and map are partially tested
 - food is extensively tested using the created test-function
- Also added DELAY(ms) macro to common.c
2023-11-11 11:14:38 +01:00

29 lines
880 B
C

#pragma once
// global configuration macros
#define MAX_MAP_SIZE 20
#define MAX_MAP_FIELDS (MAX_MAP_SIZE*MAX_MAP_SIZE)
// logging settings
#define DEBUG_OUTPUT_ENABLED
#define INFO_OUTPUT_ENABLED
// struct for storing game configuration
typedef struct config_t
{
const int windowSize; // feste Größe des Spielfensters
//Breite und Höhe sind gleich -> Spielfeld ist quadratisch
int blockSizePx; // Pixelgröße von einem Block
//wird über windowSize/mapHeight berechnet
int cycleDurationMs; // ms between each game loop iterartion (game speed)
int difficulty; // 0-3 //Schwierigkeitsgrad
int snakeDefaultLength; // = 2 //Länge der Schlange
const char *leaderboardFilename; // Dateiname des Leaderboards
} config_t;
// global config struct defined in config.c
extern config_t config;