2 ms·
I did a few games with Elm but used the SVG route myself. It's usually a lot easier to work with and you don't really have to deal with CSS and the DOM update i
by speps 9y ago
I did a few games with Elm but used the SVG route myself. It's usually a lot easier to work with and you don't really have to deal with CSS and the DOM update is still lazy.
Finally, I think there are a few red flags in your code. For example you have a hardcoded list of cell locations but you use a method to compute the number of rows which has a sqrt in it... might as well hardcode the number of rows :)
- fiatjaf 9y agoIs the code for these games available? I've never programmed a game before, I want to do it. Maybe doing it in Elm will be a good idea.
- AnkhMorporkian 9y agoI don't mean to be a naysayer, but if you want to program a real game, Elm really isn't the language to do it in. Perhaps at some point in the future it'll be a language to watch, but there are far better options available right now, even if you want to stay functional.
- vishaltelangre 9y agoI am thinking to change the board model to use Dict instead of List altogether to reduce the hacks and chances of having a model which represents invalid states. Thanks.