Changed base values

This commit is contained in:
catdotjs
2025-04-19 02:45:20 +03:00
parent c88e033bdc
commit 6ccd1b753e

View File

@@ -8,6 +8,7 @@
* ncurses * ncurses
* thats it... * thats it...
*/ */
#include <algorithm> #include <algorithm>
#include <chrono> #include <chrono>
#include <csignal> #include <csignal>
@@ -51,7 +52,7 @@ struct vec2 {
class Game { class Game {
public: public:
Game(uint16_t boardX = 40, uint16_t boardY = 60, uint16_t framesPerSec = 20) Game(uint16_t boardX = 90, uint16_t boardY = 30, uint16_t framesPerSec = 10)
: delay(1000 / framesPerSec), boardSize(boardX, boardY), : delay(1000 / framesPerSec), boardSize(boardX, boardY),
snakeHead(boardX / 2, boardY / 2), GameBoard(boardX * boardY, 0), snakeHead(boardX / 2, boardY / 2), GameBoard(boardX * boardY, 0),
snakeDir(0, -1) { snakeDir(0, -1) {
@@ -190,7 +191,7 @@ std::unique_ptr<Game> game;
void handleSignal(int signal) { game->end(); } void handleSignal(int signal) { game->end(); }
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
game = std::make_unique<Game>(90, 30, 10); game = std::make_unique<Game>();
std::signal(SIGTERM, handleSignal); std::signal(SIGTERM, handleSignal);
std::signal(SIGINT, handleSignal); std::signal(SIGINT, handleSignal);
game->start(); game->start();