Add snake gui app and update os/usr parts. Now snake can run!

This commit is contained in:
Yu Chen 2023-01-08 22:41:41 +08:00
parent b40120f8ff
commit 2cbd237260
14 changed files with 457 additions and 15 deletions

View file

@ -0,0 +1,16 @@
#![no_std]
#![no_main]
#[macro_use]
extern crate user_lib;
use oorandom;
#[no_mangle]
pub fn main() -> i32 {
println!("random num program!");
let seed = 4;
let mut rng = oorandom::Rand32::new(seed);
println!("OORandom: Random number 32bit: {}", rng.rand_i32());
println!("OORandom: Random number range: {}", rng.rand_range(1..100));
0
}