Skip to content

Commit

Permalink
Stub out equip function for weapons and rng
Browse files Browse the repository at this point in the history
  • Loading branch information
mwunsch committed Nov 9, 2016
1 parent f9216cc commit 7735a65
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Model.elm
Expand Up @@ -24,7 +24,7 @@ import Svg.Attributes exposing (..)
import Tabletop exposing (Position, Inch, posX, posY)
import Utilities exposing (textNode, onClickWithoutPropagation)
import Uuid exposing (Uuid, uuid)
import Weapons exposing (Weapon, knife)
import Weapons exposing (Weapon, knife, autogun, autopistol)


type alias Model =
Expand Down Expand Up @@ -192,6 +192,13 @@ init role =
}


{-| At some point, weapon cost will have to be modeled.
-}
equip : Weapon -> Model -> Model
equip weapon model =
{ model | equipment = weapon :: model.equipment }


cost : Model -> Int
cost model =
case model.fighterType of
Expand All @@ -216,6 +223,8 @@ generator role =
in
uuid
|> Random.map (\id -> { initial | id = (Debug.log "id" id) })
|> Random.map (equip autogun)
|> Random.map (equip autopistol)


type alias MovementError =
Expand Down

0 comments on commit 7735a65

Please sign in to comment.