Package bunny

Examples of bunny.Bunny


  public String executeCommand(List<String> params) {
    if(params.size() != 0){
      MessageBox.get().getMessage(Messages.ParameterCountMismatch);
    }
   
    Bunny bunny = ObjectStore.getInstance().getBunny();
   
    StringBuilder sb = new StringBuilder();
    sb.append("____Bunny details____\r\n");
    sb.append("Route id: " + ObjectStore.getInstance().getRouteKey(bunny.getRoute()) + "\r\n");
    sb.append("Position: " + bunny.getPos() + "\r\n");
    sb.append("Immune Time: " + bunny.getImmuneTime() + "\r\n");
    sb.append("Respawn Time: " + bunny.getRespawnTime() + "\r\n");
   
    return sb.toString();
  }
View Full Code Here


    }
    try{
      String routeId = params.get(0);
      int position = Integer.parseInt(params.get(1));
     
      Bunny bunny = ObjectStore.getInstance().getBunny();
     
      Route route = ObjectStore.getInstance().getRoute(routeId);
      if(route == null)
        return MessageBox.get().getMessage(Messages.NotFound) + "(Route) \r\n";
     
      if(position < 0 || position > route.getLength()){
        return MessageBox.get().getMessage(Messages.Error) + "(nem megfelelo hosszusag) \r\n";
      }
     
      bunny.setBunnyPlace(route, position);
     
      return "Sikeresen athekkeltuk a bunnyt!";
    } catch(NumberFormatException e){
      return MessageBox.get().getMessage(Messages.WrongParameter) + "(position.type == INT)\r\n";
    }
View Full Code Here

TOP

Related Classes of bunny.Bunny

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.