Skip to content
generateui edited this page Nov 20, 2010 · 5 revisions

Game progress

Several phases exist within OpenSettlers. The main phase is GamePhase. This phase defines the current state of the game. Several GamePhases exist:

  • Lobby
    • Game waits for nough players to join the game
  • DetermineFirstPlayer
    • Dices are rolled by each player, highroller starts. When multiple highrollers are present, all highrollers roll again untill there is a single highroller.
    • The highroller (game starter) places the first port, places the first town, and starts with the first turn.
  • PlacePorts
    • Only when the map requires players to place ports, this phase is executed.
    • Highroller places the first port, player after him second, et cetera.
  • InitialPlacement
    • Every player places a town & road, and then another town & road.
    • Optionally, if Tournament Starting Rules is selected in game options, the second town is a city, and a third road is placed.
  • PlayTurns
    • Each player plays a turn, which in itself has 4 phases:
      • BeforeRollDice (soldier & victory point development card, claim victory)
      • RollDice
      • Trading
      • Build
  • Ended

Check if a turn is allowed in a phase

A GameAction has an overloaded isAllowed method: public boolean isAllowed(GamePhase gamePhase) and an public boolean isAllowed(TurnPhase turnPhase) Every subclass of GameAction provides a specific implementation of these two methods. However, to determine whether or not the GamAction is allowed in the current GamePhase instance of the Game class, call game.getGamePhase().isAllowed(GameAction action) BuildingTurnPhase and TradingTurnPhase may toggle if the game setting "TradingAfterBuilding" is set.

Allowed turns per phase

This listing shows the allowed turns within each GamePhase and TurnPhase:

  • Lobby
    • Chat (GameAction)
    • GameOptionsChanged (LobbyAction)
    • EnterLobby (LobbyAction)
    • GameCreated (LobbyAction)
    • GameJoined (LobbyAction)
    • JoinGame (LobbyAction)
    • StartGame (LobbyAction)
    • UserLeft (LobbyAction)
    • UserLeftGame (LobbyAction)
    • UserDisconnected (LobbyAction)
  • DetermineFirstPlayer
    • RollDice (TurnAction)
    • RolledSame (TurnAction)
  • PlacePorts
    • PlacePort (TurnAction)
  • InitialPlacement
    • BuildTown (TurnAction)
    • BuildRoad (TurnAction)
    • BuildShip (TurnAction)
    • BuildCity (TurnAction)
    • DiscoverHex (TurnAction)
  • PlayTurns
    • Actions allowed in this phase are determined by the current TurnPhase:
      • BeforeRollDice
        • PlayDevelopmentCard (Soldier/Victory point) (TurnAction)
        • ClaimVictory (TurnAction)
        • PlaceRobberPirate (TurnAction)
        • RobPlayer (TurnAction)
        • LargestArmyChanged (InGameAction)
      • RollDice
        • RobPlayer (TurnAction)
        • PlaceRobberPirate (TurnAction)
        • LooseCards (InGameAction)
        • PickGold (InGameAction)
        • RollVolcanoDice (TurnAction)
        • LongestRouteChanged (InGameAction)
        • LargestArmyChanged (InGameAction)
        • RollDice (TurnAction)
      • Trading
        • TradeOffer (TurnAction)
        • EndTrade (TurnAction)
        • TradePlayer (TurnAction)
        • AcceptOffer (InGameAction)
        • CounterOffer (InGameAction)
        • RejectOffer (InGameAction)
      • Building
        • ClaimVictory (TurnAction)
        • BuildTown (TurnAction)
        • BuildCity (TurnAction)
        • BuildRoad (TurnAction)
        • BuildShip (TurnAction)
        • MoveShip (TurnAction)
        • BuyDevcard (TurnAction)
        • PlayDevcard (TurnAction)
        • PlaceRobber (TurnAction)
        • RobPlayer (TurnAction)
        • EndTurn (TurnAction)
        • LongestRouteChanged (InGameAction)
        • LargestArmyChanged (InGameAction)
        • TradeRoutesChanged (InGameAction)
        • SwapChit (TurnAction)
        • DiscoverChit (TurnAction)
        • DiscoverHex (TurnAction)
        • TradeBank (TurnAction)
  • Ended

Valid in all game/turnphases:

  • Chat
Clone this wiki locally