Commit 0bfa274
authored
Added snake game sample (#111)
* Added snake game sample
* Worked on snake game sample:
- integrated with the other examples in the Cargo.toml
- removed the comment about cargo.toml, including unnecessary cmake dependency
- removed unused imports and functions, and unused impls
- swapped out rl/thd parameters for a rl.draw(&mut thd)
- removed commented out code
- removed unnecessary generics
- renamed add_direction to move_direction
- added win state to replace panic
- fixed bug for food sometimes placed out of bounds
- fixed spelling errors1 parent 93dde6b commit 0bfa274
2 files changed
+561
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
0 commit comments