GamePhaseService

scalata.application.services.GamePhaseService
case class GamePhaseService(currentPhase: GameControllerState)

Mutable-looking, yet immutable, holder of the current finite-state-machine phase.

==== Responsibilities ====

  • Expose the current phase through getCurrentPhase.
  • Create a new instance with an updated phase via transitionTo (pure copy, no mutation).

This minimal wrapper exists so that the GameEngine can pass a single value around and still treat the phase as a first-class object.

Value parameters

currentPhase

FSM node the game is presently in; defaults to GameControllerState.Menu.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Produce a new service pointing to newPhase.

Produce a new service pointing to newPhase.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product