Package ch.fusun.baron.server.rmi

Source Code of ch.fusun.baron.server.rmi.GameStateServiceImpl

package ch.fusun.baron.server.rmi;

import ch.fusun.baron.data.AbstractDataProvider;
import ch.fusun.baron.data.DataUpdate;
import ch.fusun.baron.data.EmptyUpdate;

/**
* Holds the game state
*/
public class GameStateServiceImpl extends AbstractDataProvider implements
    GameStateService {

  private ServerPhase phase = ServerPhase.LOBBY;

  @Override
  public ServerPhase current() {
    return this.phase;
  }

  @Override
  public void transitionTo(ServerPhase newPhase) {
    this.phase = newPhase;
  }

  @Override
  public DataUpdate createFullUpdate() {
    return new EmptyUpdate();
  }

}
TOP

Related Classes of ch.fusun.baron.server.rmi.GameStateServiceImpl

TOP
Copyright © 2018 www.massapi.com. 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.