Last active
November 28, 2020 14:01
-
-
Save vladbatushkov/1785eea9dbbfabbc3409f63e29f1eb64 to your computer and use it in GitHub Desktop.
eatnoteat update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Msg | |
= Idle | |
| Eat (List Tags) | |
| Damage Int | |
| HpCheck Int | |
| ChangeHero Hero | |
| ShuffleFood | |
| Shuffle (List Food) | |
| Animate AnimatedObject Animation.Msg | |
update : Msg -> Model -> ( Model, Cmd Msg ) | |
update action model = | |
case action of | |
Idle -> | |
( model, Cmd.none ) | |
Eat tags -> | |
... | |
Damage points -> | |
... | |
HpCheck points -> | |
... | |
ChangeHero hero -> | |
( { model | hero = hero, screen = PlayScreen }, Cmd.none ) | |
ShuffleFood -> | |
( model, generate Shuffle <| shuffle model.foodPanel.foods ) | |
Shuffle randomFoods -> | |
... | |
Animate aObj aMsg -> | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment