}
// new stone configuration
for (int x = zoomX; x < zoomX + zoomW; x++)
for (int y = zoomY; y < zoomY + zoomH; y++) {
WIT wit = getWit(x, y);
wit.clear(WIT.CELL);
if (setupCells)
wit.setCell(x, y, boardSize);
byte color = game.board.get(x, y);
if (color != Board.NONE)
wit.setStone(color == Board.BLACK);
}
if (setupCells) {
final int[] hoshis = Board.getHoshis(boardSize);
if (hoshis != null)
for (int k = 0; k < hoshis.length; k++) {
SGFPoint sgfp = Board.xy(hoshis[k], boardSize);
if (isInView(sgfp))
getWit(sgfp).addMark(WIT.HOSHI);
}
setupCells = false;
}
SGFNode lastMoveNode = game.kifuLastMove();
// draw marks from properties
for (Enumeration e = lastMoveNode.getProperties(); e.hasMoreElements(); ) {
SGFProperty prop = (SGFProperty) e.nextElement();
try {
SGFPoint sgfp = prop.getPoint();
if (isInView(sgfp)) {
WIT wit = getWit(sgfp);
if (prop.name() == SGFPropertyName.TR)
wit.addMark(WIT.TRIANGLE);
else if (prop.name() == SGFPropertyName.SQ)
wit.addMark(WIT.SQUARE);
else if (prop.name() == SGFPropertyName.CR)
wit.addMark(WIT.CIRCLE);
else if (prop.name() == SGFPropertyName.MA)
wit.addMark(WIT.CROSS);
else if (prop.name() == SGFPropertyName.SL)
wit.addMark(WIT.SELECTED);
else if (prop.name() == SGFPropertyName.DD)
wit.addMark(WIT.DIMMED);
else if (prop.name() == SGFPropertyName.TW)
wit.addMark(WIT.WHITE_TER);
else if (prop.name() == SGFPropertyName.TB)
wit.addMark(WIT.BLACK_TER);
else if (prop.name() == SGFPropertyName.LB)
wit.setLabel(prop.getText());
else if (prop.name() == SGFPropertyName.VW)
wit.addMark(WIT.VIEW);
}
} catch (SGFInvalidDataRequestException e1) {
}
}