Improve error message

This commit is contained in:
ekzyis 2024-09-26 11:11:14 +02:00
parent d1315b931b
commit 31d9ff02d5
1 changed files with 2 additions and 2 deletions

View File

@ -1334,11 +1334,11 @@ func getXY(position string) (int, int, error) {
posY = runes[1] posY = runes[1]
if posX < 'a' || posX > 'h' { if posX < 'a' || posX > 'h' {
return -1, -1, fmt.Errorf("invalid move: %s", position) return -1, -1, fmt.Errorf("square does not exist: %s", position)
} }
if posY < '1' || posY > '8' { if posY < '1' || posY > '8' {
return -1, -1, fmt.Errorf("invalid move: %s", position) return -1, -1, fmt.Errorf("square does not exist: %s", position)
} }
// image origin (0,0) is at top-left corner (a8) // image origin (0,0) is at top-left corner (a8)