GameState

case class GameState(turnNum: Int, posn: Pt2, rainbowCycle: RainbowCycle)

GameState. The game world state between turns. This is an ultra simple single player turn game, with only two actions, move and change colour. It is not intended as interesting game, but merely to illustrate the common features of a functionally implemented game.

Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def turn(cmd: TurnCmd): GameState

Move to a new posn if no greater than 150 pixel distant

Move to a new posn if no greater than 150 pixel distant

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product