Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ bool Board::step()

default:
std::cerr << "WARNING: The ball is arrived at (" << ball->x << ", " << ball->y << "), but this cell is given no action." << std::endl;
if ((ball->x < 0) || (ball->x >= width)) {
continuing = false;
delete ball;
ball = nullptr;
}
}

return continuing;
Expand Down