bwindels / rusty-snake

CLI snake game implemented in rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

start with hardest part in c, polling the keyboard with a timeout. Then port this to rust and build a snake game around it.

C prototype

  • write keyboard polling code using kqueue
  • make kqueue timeout work properly
  • measure elapsed time of kevent call to support a timer
  • set terminal in raw mode to prevent stdin buffering
  • write code to position cursor

Rust application

port c prototype to rust, and start porting snake-js code on top of this, using mainly stack allocation.

About

CLI snake game implemented in rust


Languages

Language:Rust 100.0%