From b74611d2b20fc071b8a699f2ce25e61f60118d6e Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 22 May 2022 23:13:29 +0200 Subject: refactor: improve input handling & remove commands --- src/commands/insert_cell.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 src/commands/insert_cell.cpp (limited to 'src/commands/insert_cell.cpp') diff --git a/src/commands/insert_cell.cpp b/src/commands/insert_cell.cpp deleted file mode 100644 index 86a5a52..0000000 --- a/src/commands/insert_cell.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "insert_cell.hpp" - -#include - -InsertCellCommand::InsertCellCommand( - const std::shared_ptr &cursor_controller, - const std::shared_ptr &scene) noexcept - : _cursor_controller(cursor_controller), _scene(scene) -{ -} - -void InsertCellCommand::execute() noexcept -{ - const auto position = _cursor_controller->where(); - - std::cout.put('x'); - std::cout.flush(); - - _cursor_controller->move_to(position); - - auto matrix = _scene->get_matrix(); - - matrix->set(position - Vector2({.x = 0U, .y = 1U}), "#"); -} -- cgit v1.2.3-18-g5258