<p>Hello,</p>
<p>I'm looking for better tools to work with concurrent programming and seens GO fits well. To do so I coded Conway's Game of Life algorithm with Go.
I would love if you could waste some time criticizing and giving opinions on the code wrote.</p>
<p>Check my code here: <a href="https://github.com/luizdepra/game-of-learn/tree/master/go">https://github.com/luizdepra/game-of-learn/tree/master/go</a></p>
<p>So far I know I not seeding rand function, and I must to so. And I can do more error handling. You guys see any another improvements?</p>
<p>Ty.</p>
<hr/>**评论:**<br/><br/>bbrazil: <pre><p>I've implemented <a href="http://demo.robustperception.io:9090/consoles/life.html" rel="nofollow">Conway's Game of Life</a> in a language that's implemented in Go. Not having a good source of randomness leads to odd patterns.</p></pre>dasacc22: <pre><p>Overall, looks nice. I did something similar when first learning Go as well.
<a href="https://github.com/dskinner/cell" rel="nofollow">https://github.com/dskinner/cell</a></p>
<p>Given the similarities in game-of-life and some rules from wolfram's a new kind of science, i used that as an opportunity to play with Go interfaces at the time. You can check that out here:
<a href="https://github.com/dskinner/cell/tree/master/automata" rel="nofollow">https://github.com/dskinner/cell/tree/master/automata</a></p>
<p>You may want to consider supporting custom rules just for fun. Also, i never got around to it but I did want to be able to save/load preset cell start positions. Don't know if it still works but the opengl output of mine allowed pause/resume with spacebar, draw/erase with mouse, and zoom with mousewheel. For game of life, that allowed creating some of the more interesting structures which was fun.</p>
<p>You may also want to write some benchmarks (and thus learn about testing in Go) so you can establish an upper bound of what your implementation can support just for documentation (and then learn about go doc).</p>
<p>Lots of ways to have fun here and improve.</p></pre>RawArkanis: <pre><p>Sure, I'll code presets. Nice idea. Tests and debuging are my next stop too.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传