Skip to content

Commit

Permalink
single main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
helio-frota committed Oct 19, 2024
1 parent 3394d1c commit 17d6165
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
24 changes: 21 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
use color_eyre::Result;
use macroquad::{audio::{self, PlaySoundParams}, prelude::*};
use player::Player;
use macroquad::{
audio::{self, PlaySoundParams},
prelude::*,
};

extern crate rand;
use rand::Rng;

mod player;
struct Player {
x: f32,
y: f32,
score: i16,
steps: i16,
}

impl Player {
fn new(x: f32, y: f32) -> Player {
Player {
x,
y,
score: 0,
steps: 0,
}
}
}

// Util functions
fn rand_gold_position() -> u32 {
Expand Down
17 changes: 0 additions & 17 deletions src/player.rs

This file was deleted.

0 comments on commit 17d6165

Please sign in to comment.