commit b797c6ed2bbf373fbc0fc82a2cf51a1fbbb718b9
parent 39ef702e2bd9c5668a93439c11a0b21998c9240f
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date: Sun, 31 Mar 2024 23:05:15 -0300
Set cursor initial position at center of board
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/guias/2/ej12.cpp b/guias/2/ej12.cpp
@@ -318,6 +318,11 @@ int main (void) {
std::cout << "\033[" << tui_total_height-1 << "A";
std::cout << "\033[" << ((cursor_col*4)+2) << "C";
+ game_move_cursor_right();
+ game_redraw_board();
+ game_move_cursor_down();
+ game_redraw_board();
+
while(game_status != EXIT) {
game_key_handler();
game_check_status();