// all derived classes must check this to disable user clicks while the computer is thinking
if (controller.isProcessing()) {
return;
}
Location loc = getRenderer().createLocation(e);
GoBoard board = (GoBoard) controller.getBoard();
boolean player1sTurn = controller.isPlayer1sTurn();
GameContext.log( 3, "BoardViewer: mousePressed: player1sTurn()=" + player1sTurn);
GoMove m = new GoMove( loc, 0, new GoStone(player1sTurn));
// if there is already a piece where the user clicked, or its
// out of bounds, or its a suicide move, then return without doing anything
GoBoardPosition stone = (GoBoardPosition) board.getPosition( loc );
// if stone is null, then the user clicked out of bounds.
if ( stone != null ) {
processStonePlacement(loc, m, stone);
}