Skip to content

coijanovic/cedar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is part of a series of fun little programs I write to learn rust:

  • Alder: Conway's Game of Life
  • Balsa: Image to Emoji
  • Cedar: Auto snake game

Cedar

Have you ever wanted to watch your computer play snake in a somewhat clumsy fashion? Here you go!

cargo run and enjoy! 🐍

Usage

You can choose the decision algorithm the snake uses via commandline flags. The available options are:

  • --random (default): The snake chooses a random (possible) direction for every step
  • --greedy: The snake selects the (possible) direction which brings her closest to the food in the next step
  • --angle: If the food is in the same column as the snake, she goes down. Otherwise, she goes right.

Use --help for more information.

About

Rust Diaries III: Automatic Snake Player

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages