Grid

floodsim.model.grid.Grid
See theGrid companion object
trait Grid[T <: GridElement]

Abstraction of a 2D grid indexed by Coordinate containing elements of type T.

Type parameters

T

type of the elements, constrained to GridElement

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait DistanceGrid[T]
class MapBasedGrid[T]

Members list

Value members

Abstract methods

def getElementAt(coordinate: Coordinate): Option[T]

Returns the element at the specified coordinate, if present.

Returns the element at the specified coordinate, if present.

Value parameters

coordinate

requested position

Attributes

Returns

Some(element) if present, otherwise None

def height: Int

Grid height (number of rows).

Grid height (number of rows).

Attributes

def width: Int

Grid width (number of columns).

Grid width (number of columns).

Attributes