Skip to content

Instantly share code, notes, and snippets.

@cmdruid
Last active May 28, 2024 03:36
Show Gist options
  • Save cmdruid/481a9037f98d8d34b277dba8a5f3d0f4 to your computer and use it in GitHub Desktop.
Save cmdruid/481a9037f98d8d34b277dba8a5f3d0f4 to your computer and use it in GitHub Desktop.
astley.c
const TURN_RADIUS: i32 = 360;
fn give_direction(you: &str, action: &str) {
println!("Giving {} {}", you, action);
}
fn let_direction(you: &str, action: &str) {
println!("Letting {} {}", you, action);
}
fn turn_action(degrees: i32) {
println!("Turning {} degrees", degrees);
}
fn desert_action(you: &str) {
println!("Deserting {}", you);
}
fn main() {
let you = "NoStrangerToLove";
// Rules
if false {
give_direction(you, "up");
let_direction(you, "down");
turn_action(TURN_RADIUS);
desert_action(you);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment