This commit is contained in:
2025-03-30 22:43:41 +02:00
parent 0271b56542
commit f4b58fb67e
6 changed files with 99 additions and 18 deletions

View File

@@ -71,7 +71,7 @@ bool PlayerCursor::addPosition(unsigned int x, unsigned int y) {
if (x > this->rows.at(y)) return false;
this->rows.at(y)++;
if (x <= this->position.x) {
if ((y == this->position.y) && (x <= this->position.x)) {
this->position.x++;
}
return true;
@@ -82,7 +82,7 @@ bool PlayerCursor::removePosition(unsigned int x, unsigned int y) {
if (x >= this->rows.at(y)) return false;
this->rows.at(y)--;
if (x < this->position.x) {
if ((y == this->position.y) && (x < this->position.x)) {
this->position.x--;
}
return true;