DefaultShape

class DefaultShape(positions: Set<Position>) : Shape, Collection<Position>

Functions

contains
Link copied to clipboard
common
open operator override fun contains(element: Position): Boolean
containsAll
Link copied to clipboard
common
open override fun containsAll(elements: Collection<Position>): Boolean
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
isEmpty
Link copied to clipboard
common
open override fun isEmpty(): Boolean
iterator
Link copied to clipboard
common
open operator override fun iterator(): Iterator<Position>
offsetToDefaultPosition
Link copied to clipboard
common
open override fun offsetToDefaultPosition(): Shape
Offsets this Shape to the default position (column=0,row=0), so offsetting a Shape which contains (Position(2, 3), Position(3, 4)) will be transformed to ((Position(0, 0), Position(1, 1)).
plus
Link copied to clipboard
common
open operator fun plus(shape: Shape): Shape
Combines two Shapes into a new one which means that this operation creates an union of the Positions of both Shapes.
toString
Link copied to clipboard
common
open fun toString(): String
toTileGraphics
Link copied to clipboard
common
open override fun toTileGraphics(tile: Tile, tileset: TilesetResource): TileGraphics
Creates a TileGraphics from this Shape using tile to fill the positions.

Properties

positions
Link copied to clipboard
common
open override val positions: Set<Position>
All the Positions this Shape contains.
size
Link copied to clipboard
common
open override val size: Int

Sources

(source)
Link copied to clipboard