This commit is contained in:
DarthMooMancer
2025-09-24 14:48:38 -04:00
parent 0d47de8a7a
commit 119c1422c0
5 changed files with 46 additions and 12 deletions
+5 -2
View File
@@ -15,15 +15,17 @@ int main () {
Point* segments[ROW * COL] = {};
segments[0] = new Point { 5, 5, '*', 1 };
// segments[1] = new Point { 6, 5, '@', 0 };
segments[1] = new Point { 6, 5, '@', 0 };
std::thread input_thread(
&Input::get_input, &input,
std::ref(segments[0]->m_direction),
std::ref(running));
std::ref(running),
std::ref(_score));
while (running) {
get_new_pos(window.m_board, segments);
check_new_tail(segments);
// body.check_new_tail();
// if(body.m_body.size() >= (ROW * COL)) {
// std::cout << "You win! Score: " + std::to_string(body.m_body.size()) << std::endl;
@@ -37,6 +39,7 @@ int main () {
// body.get_new_pos(head);
//
// head.m_previous_head.set_new_point(head.m_head);
std::cout << _score << "\n";
window.draw_display();
window.update_display(segments);
}