scalata.infrastructure.view.terminal

Members list

Type members

Classlikes

class ChampSelectView[F[_]](val view: GameView[F, String])(implicit evidence$1: Sync[F]) extends View[ChampSelectView[F], String, PlayerClasses, String, F]

Champion-selection screen.

Champion-selection screen.

The view extends the generic View template, supplying: • an ASCII banner that lists available possible inputs; • a parse implementation that maps raw user input.

Type parameters

F

effect type (e.g. IO)

Value parameters

view

low-level GameView through which all rendering and input occur (dependency-injected so that we stay UI-agnostic).

Attributes

Supertypes
trait View[ChampSelectView[F], String, PlayerClasses, String, F]
class Object
trait Matchable
class Any
class GameOverView[F[_]](val view: GameView[F, String])(implicit evidence$1: Sync[F]) extends View[GameOverView[F], String, Boolean, String, F]

Game over screen.

Game over screen.

The view extends the generic View template, supplying: • an ASCII banner that lists available possible inputs; • a parse implementation that maps raw user input.

Type parameters

F

effect type (e.g. IO)

Value parameters

view

low-level GameView through which all rendering and input occur (dependency-injected so that we stay UI-agnostic).

Attributes

Supertypes
trait View[GameOverView[F], String, Boolean, String, F]
class Object
trait Matchable
class Any
class GameRunView[F[_]](val view: GameView[F, String])(implicit evidence$1: Sync[F])

Game Running screen.

Game Running screen.

The view extends the generic View template, supplying: • an ASCII banner that lists available possible inputs; • a parse implementation that maps raw user input.

Type parameters

F

effect type (e.g. IO)

Value parameters

view

low-level GameView through which all rendering and input occur (dependency-injected so that we stay UI-agnostic).

Attributes

Supertypes
class Object
trait Matchable
class Any
object HelpView

Help String

Help String

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
HelpView.type
class MenuView[F[_]](val view: GameView[F, String])(implicit evidence$1: Sync[F]) extends View[MenuView[F], String, Boolean, String, F]

Menu screen.

Menu screen.

The view extends the generic View template, supplying: • an ASCII banner that lists available possible inputs; • a parse implementation that maps raw user input.

Type parameters

F

effect type (e.g. IO)

Value parameters

view

low-level GameView through which all rendering and input occur (dependency-injected so that we stay UI-agnostic).

Attributes

Supertypes
trait View[MenuView[F], String, Boolean, String, F]
class Object
trait Matchable
class Any
object Shared

Terminal-view helper utilities shared.

Terminal-view helper utilities shared.

Responsibilities
• Wire a map GameControllerState ⇒ Controller[F] so that the GameEngine
can route the state machine to the correct controller. • Provide a generic run loop that repeatedly asks the user for input until the supplied parse function succeeds.
• Offer small helper parsers (e.g. booleanParse) used by several interactive screens.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Shared.type