Grid

floodsim.model.grid.Grid
See theGrid companion trait
object Grid

Factory for building grids.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Grid.type

Members list

Value members

Concrete methods

def filledWith[T <: GridElement](width: Int, height: Int, element: T): Grid[T]

Creates a grid fully populated with the same element in every cell. The element instance is reused for all coordinates.

Creates a grid fully populated with the same element in every cell. The element instance is reused for all coordinates.

Type parameters

T

element type

Value parameters

element

element to fill each cell with

height

grid height (>= 1)

width

grid width (>= 1)

Attributes

Returns

an immutable Grid filled with element