Tetris

scalatetris.engine.Tetris
object Tetris

Objeto principal que implementa la lógica del juego Tetris usando el sistema de actores de Akka.

Este objeto maneja:

  • Los comandos del juego
  • El ciclo de juego
  • La interacción con el motor del juego
  • La gestión del audio

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Tetris.type

Members list

Type members

Classlikes

sealed trait Command

Trait sellado que define todos los comandos posibles en el juego

Trait sellado que define todos los comandos posibles en el juego

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Continue.type
object Down.type
object GameOver.type
object HardDrop.type
object Hold.type
object Left.type
object Pause.type
object Restart.type
object Right.type
object RotateLeft.type
object RotateRight.type
object Tick.type
Show all
case object Continue extends Command

Comando para continuar el juego desde pausa

Comando para continuar el juego desde pausa

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
Continue.type
case object Down extends Command

Comando para mover la pieza hacia abajo

Comando para mover la pieza hacia abajo

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
Down.type
case object GameOver extends Command

Comando para indicar game over

Comando para indicar game over

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
GameOver.type
case object HardDrop extends Command

Comando para ubicar inmediatamente la pieza actual

Comando para ubicar inmediatamente la pieza actual

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
HardDrop.type
case object Hold extends Command

Comando para guardar la pieza actual

Comando para guardar la pieza actual

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
Hold.type
case object Left extends Command

Comando para mover la pieza a la izquierda

Comando para mover la pieza a la izquierda

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
Left.type
case object Pause extends Command

Comando para pausar el juego

Comando para pausar el juego

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
Pause.type
case object Restart extends Command

Comando para reiniciar el juego

Comando para reiniciar el juego

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
Restart.type
case object Right extends Command

Comando para mover la pieza a la derecha

Comando para mover la pieza a la derecha

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
Right.type
case object RotateLeft extends Command

Comando para rotar la pieza en sentido antihorario

Comando para rotar la pieza en sentido antihorario

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
RotateLeft.type
case object RotateRight extends Command

Comando para rotar la pieza en sentido horario

Comando para rotar la pieza en sentido horario

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
case object Tick extends Command

Comando para actualizar el ciclo de juego

Comando para actualizar el ciclo de juego

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all
Self type
Tick.type

Value members

Concrete methods

def apply(engine: GameEngine, display: Display): Behavior[Command]

Crea el comportamiento del actor Tetris.

Crea el comportamiento del actor Tetris.

Value parameters

display

Interfaz para mostrar el estado del juego

engine

Motor del juego que maneja la lógica

Attributes

Returns

Comportamiento del actor configurado