fix: fixed space error

This commit is contained in:
moonleay 2024-12-03 13:46:50 +01:00
parent bf435716e8
commit da7c9b8eec
Signed by: moonleay
GPG key ID: 82667543CCD715FB

View file

@ -85,7 +85,6 @@ vector<int> move_player(vector<int> player_pos, char input)
// Check if it is possible to move player to target pos // Check if it is possible to move player to target pos
if (can_move_player(player_pos, -1, 0)) if (can_move_player(player_pos, -1, 0))
--player_pos[1]; --player_pos[1];
// Actually move player
break; break;
case 's': case 's':
// Check if it is possible to move player to target pos // Check if it is possible to move player to target pos
@ -140,7 +139,7 @@ void render_play_field(const vector<int> player_pos)
{ {
// ... render ... // ... render ...
if (i == player_pos[0] && j == player_pos[1]) if (i == player_pos[0] && j == player_pos[1])
cout << "S "; // ... 'S' if it is the entry where the player is currently cout << "S"; // ... 'S' if it is the entry where the player is currently
else else
cout << play_field[i][j]; // ... the actual entry of the field cout << play_field[i][j]; // ... the actual entry of the field
} }