Updated arch

This commit is contained in:
Sigismund Dijkstra 2025-07-28 20:28:03 -05:00
parent 3d79b8c199
commit c9514edb9e
4 changed files with 62 additions and 0 deletions

BIN
DarkSnake.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Snake Game Project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

30
include/Config.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef CONFIG_H
#define CONFIG_H
namespace Config {
// Game board dimensions
constexpr int BOARD_WIDTH = 20;
constexpr int BOARD_HEIGHT = 20;
constexpr int CELL_SIZE = 24;
// Window settings
constexpr int WINDOW_WIDTH = BOARD_WIDTH * CELL_SIZE;
constexpr int WINDOW_HEIGHT = BOARD_HEIGHT * CELL_SIZE + 100; // Extra space for UI
// Game timing
constexpr float INITIAL_SPEED = 0.2f; // Seconds between moves
constexpr float SPEED_INCREMENT = 0.01f;
constexpr float MIN_SPEED = 0.05f;
// Colors (RGBA)
constexpr unsigned int BACKGROUND_COLOR = 0x000000FF; // Black
constexpr unsigned int SNAKE_COLOR = 0x00FF00FF; // Green
constexpr unsigned int FOOD_COLOR = 0xFF0000FF; // Red
constexpr unsigned int BORDER_COLOR = 0xFFFFFFFF; // White
// File paths
constexpr const char* BEST_SCORE_FILE = "best_score.txt";
constexpr const char* WINDOW_TITLE = "Snake Game";
}
#endif // CONFIG_H

11
include/GameState.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef GAMESTATE_H
#define GAMESTATE_H
enum class GameState {
MENU,
PLAYING,
PAUSED,
GAME_OVER
};
#endif // GAMESTATE_H