Board.java: explain reason for ugly check in match method