aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/game.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index b623e64..8ea6571 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -121,6 +121,21 @@ void Game::on_update() noexcept
break;
}
+ case 'x':
+ {
+ const auto position = _cursor_controller->where();
+ const auto matrix = _scene->get_matrix();
+
+ if (matrix->get(position) == ' ')
+ {
+ break;
+ }
+
+ _set_space(matrix, position, ' ');
+ _living_cell_positions.remove(position);
+ break;
+ }
+
case 'p':
{
auto onoff = !_generation_tracker->get_is_paused();