예제 #1
0
 /**
  * Checks if this is the same as the given
  *
  * @param other The actor this is being compared to
  * @return returns true if they are the same, false if not
  */
 public boolean isSame(Actor other) {
   if (other.getColor().equals(getColor())) {
     if (other.getDirection() == getDirection()) {
       if (other.getLocation().isSameLocation(other.getLocation())) {
         return true;
       }
     }
   }
   return false;
 }
예제 #2
0
 public void mouseTouched(Actor actor, GGMouse mouse, Point pix) {
   if (!isMouseEnabled) return;
   if (nbTaken == 3) setStatusText("Take a maximum of 3. Click 'OK' to continue");
   else {
     agent.sendCommand(agentName, Command.REPORT_POSITION, actor.getLocation().x);
     actor.removeSelf();
     nbMatches--;
     setStatusText(nbMatches + " matches remaining. Click 'OK' to continue");
     nbTaken++;
     refresh();
   }
 }