This commit is contained in:
DarthMooMancer
2025-09-12 22:46:59 -04:00
parent 9d3f6b3308
commit 626d7261d4
4 changed files with 23 additions and 38 deletions
+3 -3
View File
@@ -9,13 +9,13 @@ int main () {
std::srand(std::time(0));
Window window;
Input input;
Fruit fruit(window.m_board);
Fruit fruit;
Body body;
Head head;
bool running = true;
std::thread input_thread(
&Input::get_input, &input,
std::ref(head.m_head.m_direction),
std::ref(head.m_direction),
std::ref(running));
while (running) {
@@ -31,7 +31,7 @@ int main () {
fruit.get_new_pos(window.m_board, head);
body.get_new_pos(head);
head.m_previous_head.set_new_point(head.m_head.m_row, head.m_head.m_col, head.m_head.m_direction);
head.m_previous_head.set_new_point(head.m_head);
window.update_display(fruit, head, body);
}