PenteController controller = (PenteController) viewer.getController();
if (controller.isProcessing() || controller.isDone()) {
return;
}
Location loc = getRenderer().createLocation(e);
PenteBoard board = (PenteBoard) controller.getBoard();
// if there is already a piece where the user clicked or its
// out of bounds, then return without doing anything
BoardPosition p = board.getPosition( loc);
if ( (p == null) || !p.isUnoccupied() )
return;
TwoPlayerMove m =
TwoPlayerMove.createMove( loc.getRow(), loc.getCol(), 0,
new GamePiece(controller.isPlayer1sTurn()));
viewer.continuePlay( m );
}