Skip to content

Commit 0bfa274

Browse files
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 errors
1 parent 93dde6b commit 0bfa274

File tree

2 files changed

+561
-0
lines changed

2 files changed

+561
-0
lines changed

samples/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,7 @@ required-features = ["imgui"]
107107
name = "music_effects"
108108
path = "music_effects.rs"
109109
required-features = ["ringbuf"]
110+
111+
[[bin]]
112+
name = "snake"
113+
path = "snake.rs"

0 commit comments

Comments
 (0)