Moves relative to the current posxy
(self, x: int, y: int)
| 356 | raise WinError(get_last_error()) |
| 357 | |
| 358 | def _move_relative(self, x: int, y: int) -> None: |
| 359 | """Moves relative to the current posxy""" |
| 360 | dx = x - self.posxy[0] |
| 361 | dy = y - self.posxy[1] |
| 362 | if dx < 0: |
| 363 | self.__write(MOVE_LEFT.format(-dx)) |
| 364 | elif dx > 0: |
| 365 | self.__write(MOVE_RIGHT.format(dx)) |
| 366 | |
| 367 | if dy < 0: |
| 368 | self.__write(MOVE_UP.format(-dy)) |
| 369 | elif dy > 0: |
| 370 | self.__write(MOVE_DOWN.format(dy)) |
| 371 | |
| 372 | def move_cursor(self, x: int, y: int) -> None: |
| 373 | if x < 0 or y < 0: |
no test coverage detected