Package game.dice

Examples of game.dice.Die


   * @param y the y coord
   */
  public void hold(GameRoom room, int x, int y) {
    Point point = new Point(x, y);
    for (int i = 0; i < room.getDice().getDice().size(); i++) {
      Die tempDie = room.getDice().getDice().get(i);
      if (tempDie.getDieFixture().contains(point)) {
        if (!room.getDice().getSavedDice().contains(tempDie)) {
          room.getDice().addToSavedDice(tempDie);
          tempDie.setDieFixture(new Point(
              GameplayFrame.DIE_SAVE_AREA_WIDTH
                  + (Die.DIE_DIMENSION + 5) * i,
              GameplayFrame.DIE_SAVE_AREA_HEIGHT));
          return;
        } else if (room.getDice().getSavedDice().contains(tempDie)) {
          room.getDice().removeFromSavedDice(tempDie);
          tempDie.calculateNewFixtureLocation();
          return;
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of game.dice.Die

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.