25 lines
375 B
Plaintext
25 lines
375 B
Plaintext
struct Game {}
|
|
|
|
impl Game {
|
|
pub fn run_frame(&mut self) {}
|
|
}
|
|
|
|
struct Platform {
|
|
game: Game,
|
|
}
|
|
|
|
impl Platform {
|
|
pub fn new() -> Platform {
|
|
return Platform { game: Game {} };
|
|
}
|
|
|
|
pub fn run_frame(&mut self) {
|
|
*self.game.run_frame();
|
|
}
|
|
}
|
|
|
|
fn main() -> i32 {
|
|
let mut platform = Platform::new();
|
|
platform.run_frame();
|
|
return 0;
|
|
} |