GameState

learn.e1.GameState
See theGameState companion object
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.

Attributes

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

Members list

Value members

Concrete methods

def colour: Colour
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

Attributes

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product