We were only catching exceptions if we ran outside our piece array.

It was still possible to ask and get answers for invalid coordinates
as long as the resulting index was kosher. Check for that.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@982 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Dave Hoover
2010-10-15 20:15:40 +00:00
parent 3d3a232609
commit 6b1d055f10
@@ -129,6 +129,10 @@ public class DropBoard extends Board
*/
public int getPiece (int col, int row)
{
if (!inBounds(col, row)) {
log.warning("Requested piece from invalid coordinate",
"col", col, "row", row, "width", _bwid, "height", _bhei);
}
try {
return _board[coordsToIndex(col, row)];
} catch (Exception e) {