GridController

blockudoku.controllers.mediatorImpl.GridController

Manage game state related to the Grid.

Attributes

See also
Graph
Supertypes
trait Observable
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Type members

Classlikes

case class GridControllerSnapshot(grid: Grid)

Attributes

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

Value members

Abstract methods

def setElement(element: Element, selectedPos: Int): Boolean

Attempt to set the given Element at the given position.

Attempt to set the given Element at the given position.

Value parameters

element

Element to set.

selectedPos

Index of the tile to set the Element at.

Attributes

Returns

True if the Element was successfully set, false otherwise.

Concrete methods

def createSnapshot(): Unit

Creates a snapshot of the current state.

Creates a snapshot of the current state.

Attributes

override def getGrid: Grid

Gets the current Grid.

Gets the current Grid.

Attributes

Returns

the current Grid.

Definition Classes
def loadGrid(newGrid: Grid): Unit
def removeTiles(set: Set[Tile]): Unit

Set the given Tiles empty.

Set the given Tiles empty.

Value parameters

set

Tiles to set empty.

Attributes

def revertSnapshot(): Unit

Reverts the state to the most recent snapshot.

Reverts the state to the most recent snapshot.

Attributes

Inherited methods

def addObserver(observer: Observer): Unit

Adds an observer to the list of observers.

Adds an observer to the list of observers.

Value parameters

observer

The observer to add.

Attributes

Inherited from:
Observable
def notifyObservers(): Unit

Invokes the update method of all observers.

Invokes the update method of all observers.

Attributes

Inherited from:
Observable

Abstract fields

var grid: Grid

Current grid state.

Current grid state.

Attributes

Inherited fields

Recorded snapshots with the most recent snapshot at the top.

Recorded snapshots with the most recent snapshot at the top.

Attributes

Inherited from:
Snapshotable