Item

scalata.domain.entities.Item
trait Item extends Entity, Interactable

Base trait for every pick-able game object (potions, weapons, etc.).

Attributes

Graph
Supertypes
trait Interactable
trait Entity
class Object
trait Matchable
class Any
Known subtypes
class Dust
class ExitDoor
class Potion
class Sign
class Weapon

Members list

Value members

Abstract methods

def spawn(pos: Option[Point2D]): Item

Create the same item at a given position.

Create the same item at a given position.

Attributes

Concrete methods

def isPicked: Boolean

true if the item has been removed from the floor.

true if the item has been removed from the floor.

Attributes

override def toString: String

Glyph used by the ASCII renderer.

Glyph used by the ASCII renderer.

Attributes

Definition Classes
Any

Inherited and Abstract methods

Perform the interaction logic.

Perform the interaction logic.

Value parameters

gameSession

current immutable snapshot

Attributes

Returns

updated snapshot or an error wrapped in GameResult

Inherited from:
Interactable

Abstract fields

val position: Option[Point2D]

Inherited and Abstract fields

val id: String

Attributes

Inherited from:
Entity
val name: String

Attributes

Inherited from:
Entity