Esempio n. 1
0
 private void setCursor(int index) {
   moveIndex = index;
   if (isMoveSelected()) {
     frame.getBoard().setHighlight(getSelectedMove().square);
   } else {
     frame.getBoard().clearHighlight();
   }
   // ?
   frame.getBoard().repaint();
 }
Esempio n. 2
0
 public HumanPlayer(String name, BoardGameMidlet frame, int side) {
   super(name, frame.getGame(), side);
   this.frame = frame;
   BoardGame game = (BoardGame) getGame();
   game.addStateListener(this);
   frame.getBoard().addActionListener(this);
   it = new MoveIterator(game);
   moves = new Vector(game.getBoard().size);
   moveIndex = -1;
 }