game is in a working state again, now just cleaning up

This commit is contained in:
DarthMooMancer
2025-09-26 21:11:30 -04:00
parent 1f3954ac79
commit 7a6df4fbe5
4 changed files with 33 additions and 71 deletions
+1 -27
View File
@@ -21,28 +21,9 @@ int main () {
std::ref(running));
while (running) {
// for(int i = 0; i < 10; i++) {
// if(segments[i] != nullptr) segments[i]->to_string();
// else if(segments[i] == nullptr) std::cout << "NULLPTR" << "\n";
// }
// std::cout << "\n";
on_fruit_eaten(window.m_board, segments);
determine_index_zero_pos(window.m_board, segments);
move_tail_indicies(segments);
// g++;
// for(int i = 0; i < ROW; i++) {
// for(int j = 0; j < COL; j++) {
// if(window.m_board[i][j] == nullptr) std::cout << "0 ";
// if(window.m_board[i][j] != nullptr) std::cout << "p ";
// }
// std::cout << "\r\n";
// if(segments[i] != nullptr) segments[i]->to_string();
// else if(segments[i] == nullptr) std::cout << "NULLPTR" << "\n";
// }
// std::cout << "\n";
// segments[0]->to_string();
// segments[1]->to_string();
// 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;
// running = false;
@@ -50,13 +31,6 @@ int main () {
// std::cout << "You died! Score: " + std::to_string(body.m_body.size()) << std::endl;
// running = false;
// }
// head.get_new_pos();
// // fruit.get_new_pos(window.m_board, head);
// body.get_new_pos(head);
//
// head.m_previous_head.set_new_point(head.m_head);
// std::cout << _score << "\n";
on_fruit_eaten(window.m_board, segments);
window.clear_display();
window.update_display(segments);
window.draw_display(200);