Пример #1
0
 public void pawnEndPosition(Pawn p) {
   if (p.getColor() == Color.RED) {
     redEnd.setPawn(p);
   }
   if (p.getColor() == Color.BLUE) {
     blueEnd.setPawn(p);
   }
   if (p.getColor() == Color.YELLOW) {
     yelEnd.setPawn(p);
   }
   if (p.getColor() == Color.GREEN) {
     greenEnd.setPawn(p);
   }
 }
Пример #2
0
 public void pawnHomePosition(Pawn p) {
   if (p.getColor() == Color.RED) {
     redHome.setPawn(p);
   }
   if (p.getColor() == Color.BLUE) {
     blueHome.setPawn(p);
   }
   if (p.getColor() == Color.YELLOW) {
     yelHome.setPawn(p);
   }
   if (p.getColor() == Color.GREEN) {
     greenHome.setPawn(p);
   }
 }