app

Safe Haskell None
Language Haskell2010

GameView

Description

Module to display an instance of the main view, i.e. the battle between two players. Only this module (and modules that depend on it) can depend on GameViewInternal.

Synopsis

Documentation

viewGameModel :: Game -> Styled (View Action) #

Constructs a virtual DOM from a game model

mkTargetOffset :: Target -> Map MisoString MisoString #

mkTargetOffset returns the offset to display the application of a Neutral card to a creature in place.

data InPlaceCellContext #

Dumb container to reduce the number of arguments to some functions of this file.

Constructors

InPlaceCellContext  

Fields

boardToInPlaceCells #

Arguments

:: InPlaceCellContext  
-> Game  
-> Maybe TargetType

The target to which the selected card (if any) applies (if any)

-> Styled [View Action]  

boardToInPlaceCell #

Arguments

:: InPlaceCellContext  
-> Game  
-> Actionizer (Player, Card) Action  
-> Maybe TargetType

The target to which the card being selected applies (if any)

-> Player

The part considered

-> Card

The spot of the card to show

-> Styled (View Action)  

boardToPlayerTarget :: Int -> Border -> Maybe TargetType -> Player -> View Action #

Whether to show the player target at pSpot

dropEvents :: Target -> [Attribute Action] #

The events for placeholders showing drop targets

targetBorderRGB :: Interaction -> Target -> (Int, Int, Int) #

The border color of a target

boardToInHandCells #

Arguments

:: Int

The z index

-> HandDrawingInput  
-> Styled [View Action]  

data Actionizer a b #

Events on cards

Constructors

Actionizer  

Fields

Instances
Functor (Actionizer a) #  
Instance details

Defined in GameView

Methods

fmap :: (a0 -> b) -> Actionizer a a0 -> Actionizer a b #

(<$) :: a0 -> Actionizer a b -> Actionizer a a0 #

type HandOffseter = (Int, Int) -> (Int, Int) #

data HandDrawingInput #

Constructors

HandDrawingInput  

Fields

cardCellsBoardOffset :: Player -> Card -> (Int, Int) #

Offsets, in number of cells, from the board's origin