Ejemplo n.º 1
0
 public void setpalette() {
   int ind = colorindices.length;
   javaColours = new Color[ind];
   epsColours = new double[ind][3];
   for (int i = 0; i < ind; i++) {
     System.out.println("color index " + colorindices[i]);
     javaColours[i] = palette.chooseJavaColour(colorindices[i]);
     epsColours[i] = palette.chooseEPSColour(colorindices[i]);
   }
 }
Ejemplo n.º 2
0
 /**
  * Returns the MoveDouble associated with this SaveMoveDouble.
  *
  * @return the MoveDouble associated with this SaveMoveDouble.
  */
 @Override
 public Move move() {
   if (moves.size() < 2) return null;
   SaveMoveTicket move1 = moves.get(0);
   SaveMoveTicket move2 = moves.get(1);
   MoveDouble move =
       MoveDouble.instance(
           Colour.valueOf(super.colour), (MoveTicket) move1.move(), (MoveTicket) move2.move());
   return move;
 }
Ejemplo n.º 3
0
 /**
  * Returns the MoveTicket associated with this SaveMoveTicket.
  *
  * @return the MoveTicket associated with this SaveMoveTicket.
  */
 @Override
 public Move move() {
   MoveTicket move =
       MoveTicket.instance(Colour.valueOf(super.colour), Ticket.valueOf(ticket), target);
   return move;
 }
Ejemplo n.º 4
0
 /**
  * Returns the MovePass associated with this SaveMovePass.
  *
  * @return the MovePass associated with this SaveMovePass.
  */
 @Override
 public Move move() {
   return MovePass.instance(Colour.valueOf(super.colour));
 }
Ejemplo n.º 5
0
 /**
  * Constructs a new SaveMove object.
  *
  * @param colour the colour of the player to whom this move belongs.
  */
 public SaveMove(Colour colour) {
   this.colour = colour.toString();
 }