Re:Show HN: Tic Tac Toe Implemented in Elm
by vishaltelangre on Monday October 16, 2017 @02:10AM
(#15481206)
I 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.
Re:Show HN: Tic Tac Toe Implemented in Elm
by fiatjaf on Sunday October 15, 2017 @09:46AM
(#15477079)
Is 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.
Re:Show HN: Tic Tac Toe Implemented in Elm
by AnkhMorporkian on Sunday October 15, 2017 @09:49AM
(#15477097)
I 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.
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 :)