use std::io;
use std::rand::random;

mod guess {
    pub fn guessed_correctly(guess: uint, machine: uint) -> bool {
        guess == machine
    }
}

#[cfg(not(target_os = "linux"))]
fn test_os() {
    println!("You are not running Linux!")
}

fn main() {
    test_os();
    let random_value = random::<uint>() % 10u;
    let mut guess = 0u;
    for line in io::stdin().lines() {
        // guess = line.unwrap().to_int(); 
        println!("{}", line.unwrap());
    }

    println!("{}", random_value);
    println!("{}", guess);
    println!("{}", guess::guessed_correctly(guess, random_value));

}

use std::rand::random;

mod guess {
    pub fn guessed_correctly(guess: uint, machine: uint) -> bool {
        guess == machine
    }
}

fn main() {
    let random_value = random::<uint>() % 10u;
    let mut guess = 0u;
    guess += 1;
    println!("{}", random_value);
    println!("{}", guess::guessed_correctly(guess, random_value));

}

--- 
+++ 
@@ -1,4 +1,3 @@
-use std::io;
 use std::rand::random;
 
 mod guess {
@@ -7,22 +6,11 @@
     }
 }
 
-#[cfg(not(target_os = "linux"))]
-fn test_os() {
-    println!("You are not running Linux!")
-}
-
 fn main() {
-    test_os();
     let random_value = random::<uint>() % 10u;
     let mut guess = 0u;
-    for line in io::stdin().lines() {
-        // guess = line.unwrap().to_int(); 
-        println!("{}", line.unwrap());
-    }
-
+    guess += 1;
     println!("{}", random_value);
-    println!("{}", guess);
     println!("{}", guess::guessed_correctly(guess, random_value));
 
 }
Add OS checking using cfg
