nsnake/config.h

28 lines
539 B
C
Raw Permalink Normal View History

2021-09-18 03:35:02 +00:00
#ifndef CONFIG_H
#define CONFIG_H
2021-09-19 03:22:04 +00:00
#include <stddef.h>
2021-09-18 03:35:02 +00:00
// Keybinds
#define up_key 'k'
#define down_key 'j'
#define right_key 'l'
#define left_key 'h'
#define quit_key 'q'
2021-09-18 05:02:33 +00:00
// Starting legnth of the snake
2021-09-19 01:03:46 +00:00
static const size_t starting_len = 3;
2021-09-18 03:35:02 +00:00
2021-09-18 05:02:33 +00:00
// Number of apples on the field
2021-09-19 01:03:46 +00:00
static const size_t n_apples = 5;
2021-09-18 05:02:33 +00:00
2021-09-18 03:35:02 +00:00
// Speed of snake (milliseconds between moves)
static const int screen_speed = 150;
// Character for each snake segment
static const char snake_ch = '#';
2021-09-18 05:02:33 +00:00
// Character for apples
static const char apple_ch = '*';
2021-09-18 03:35:02 +00:00
#endif