From: Steinar H. Gunderson Date: Sat, 15 Nov 2014 01:56:31 +0000 (+0100) Subject: Slightly better diagnostics. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=559f0db891b73eaf115d57d26e0fe2376a4a5ed2 Slightly better diagnostics. --- diff --git a/Board.pm b/Board.pm index 2edc07d..39c8134 100644 --- a/Board.pm +++ b/Board.pm @@ -200,8 +200,11 @@ sub parse_pretty_move { push @squares, [ $row, $col ]; } } + if (scalar @squares == 0) { + die "Impossible move $move"; + } if (scalar @squares != 1) { - die "Ambigious or impossible move $move"; + die "Ambigious move $move"; } return (@{$squares[0]}, $to_row, $to_col, $promo); }