feat: fruits, globals, input, snake, point, window

This commit is contained in:
DarthMooMancer
2025-05-09 21:30:19 -04:00
parent 636ebae6a3
commit cdcffc40ea
13 changed files with 231 additions and 57 deletions
+13
View File
@@ -0,0 +1,13 @@
#include <iostream>
#include <cstdlib>
#include <ctime>
#include "util.h"
#include "fruit.hpp"
Fruit::Fruit() {
std::srand(std::time(0));
}
void Fruit::create_point() {
m_point = Point {rand() % 9, rand() % 9};
}