sketch future file structure
This commit is contained in:
parent
d332bd30f3
commit
66c9b10264
3 changed files with 58 additions and 4 deletions
|
@ -12,7 +12,7 @@ use crate::{
|
|||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Game {
|
||||
pub struct Editor {
|
||||
source_board: Board,
|
||||
machine: Machine,
|
||||
sim_state: SimState,
|
||||
|
@ -51,7 +51,7 @@ enum SimState {
|
|||
Stepping,
|
||||
}
|
||||
|
||||
impl Game {
|
||||
impl Editor {
|
||||
pub fn new_sandbox() -> Self {
|
||||
Self {
|
||||
source_board: Board::new_empty(16, 16),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::fs::read_to_string;
|
||||
|
||||
use editor::Game;
|
||||
use editor::Editor;
|
||||
use marble_engine::board::Board;
|
||||
use raylib::prelude::*;
|
||||
|
||||
|
@ -24,7 +24,7 @@ fn main() {
|
|||
textures.load_dir("assets", &mut rl, &thread);
|
||||
textures.load_dir("assets/tiles", &mut rl, &thread);
|
||||
|
||||
let mut game = Game::new_sandbox();
|
||||
let mut game = Editor::new_sandbox();
|
||||
let board = Board::parse(&read_to_string("boards/adder.mbl").unwrap());
|
||||
game.load_board(board);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue