View

scalata.infrastructure.view.View
trait View[V <: View[V, C, O, I, F], C, O, I, F[_]](view: GameView[F, I])(implicit evidence$1: Sync[F])

Generic view helper.

  • banner – value shown before asking.
  • parse – turns raw input into a domain object.
  • ask – prints banner, then delegates to a loop that re-prompts via Shared.run until parsing succeeds.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ChampSelectView[F]
class GameOverView[F]
class MenuView[F]

Members list

Value members

Abstract methods

protected def parse(raw: I): Option[O]

Concrete methods

def ask: F[O]

Show banner once, then enter retry loop.

Show banner once, then enter retry loop.

Attributes