wip
This commit is contained in:
+5
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user