emiflake / PureAdventure

An attempt at PureScript adventure.land bindings
2 stars 1 forks source link

purpose of counter? #6

Open bbarker opened 4 years ago

bbarker commented 4 years ago

https://github.com/emiflake/PureAdventure/blob/be17e892c022d9ba9657329e58fff20125c712c5/src/Bot/State.purs#L18

Just curious what this is for? A guess: to count the number of state changes? Also, in PureScript, you can use the Int type, instead of just resorting to Number what what you really want is an integer (just in case you didn't know about it); it is still backed by JS numbers under the hood but has added type safety.

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.86. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

emiflake commented 4 years ago

The counter was indeed going to be used to just count how long this state has been alive for. Thanks for the tip on Ints I had a slight suspicion that they were what I should be using but I was kind of lazy in that aspect.