# So I made this other game... (Nonaga)

**URL:** <https://discourse.elm-lang.org/t/so-i-made-this-other-game-nonaga/8200>\
**Category:** Request Feedback\
**Created:** [February 23, 2022, 5:14pm UTC](https://discourse.elm-lang.org/t/so-i-made-this-other-game-nonaga/8200 "2022-02-23T17:14:36Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![axelbdt](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/axelbdt/32/4404_2.png) [@axelbdt](https://discourse.elm-lang.org/u/axelbdt)\
**Post date:** [February 27, 2022, 1:01pm UTC](https://discourse.elm-lang.org/t/so-i-made-this-other-game-nonaga/8200/5 "2022-02-27T13:01:42Z")

</div>

Thanks for the feedback!

I implemented your suggestion as follows:

```auto
type alias Player =
    { player : Color, tokens : Set Platform }

type alias Model =
    { currentPlayer : Color
    , turnPhase : TurnPhase
    , board : Board
    , players : List Player
    , lastMovedPlatform : Platform
    , selectedToken : Maybe Token
    , selectedPlatform : Maybe Platform
    }

```

In practice I have the following problems with this model:

- I still can’t directly access a player’s tokens (like the `Dict Color (Set Platform)` would have).
- It is more involved to can’t check if a platform is empty and I loose the constraint of “one token max on a platform”.
- This introduces some additional nesting that makes the update a bit more complex.

The pros being:

- This does seem to model the game better, with improved names and straightforward types.
- It avoids the `Dict` wrangling which is quite nice, though.
- Domain functions dealing with `Player` type are nice.

I am considering going back to a `Dict Platform Color`, but with nice helper functions to get a player’s set of tokens, move the token, etc… And see which I like better

This is clearly overthinking it, but well, I have time and the goal is to improve 🙂

The updated code is here : [https://ellie-app.com/gNx2FTFYR3za1](https://ellie-app.com/gNx2FTFYR3za1)

---

_[View the full topic](https://discourse.elm-lang.org/t/so-i-made-this-other-game-nonaga/8200)._
