Package pong.common

Examples of pong.common.PlayerMovementInformation


    this.playerIndex = playerIndex;
  }

  @Override
  public synchronized PlayerMovementInformation movementInformationRequestedEvent() {
    final PlayerMovementInformation movement = new PlayerMovementInformation();
    movement.setGoingUp(listener.pressingUp());
    movement.setGoingDown(listener.pressingDown());
    return movement;
  }
View Full Code Here


   *
   * @param playerIndex
   *            the player index
   */
  public synchronized void initializeForRoundPlaying(final int playerIndex) {
    this.movement = new PlayerMovementInformation();
    if (playerIndex == 0) {
      this.position.setX(GlobalSettings.RACKETS_DISTANCE_EDGES);
    } else {
      this.position.setX(GlobalSettings.FIELD_WIDTH - GlobalSettings.RACKET_WIDTH
          - GlobalSettings.RACKETS_DISTANCE_EDGES);
View Full Code Here

TOP

Related Classes of pong.common.PlayerMovementInformation

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.