Add snake gui app and update os/usr parts. Now snake can run!
This commit is contained in:
parent
b40120f8ff
commit
2cbd237260
14 changed files with 457 additions and 15 deletions
16
user/src/bin/random_num.rs
Normal file
16
user/src/bin/random_num.rs
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue