World structs

This commit is contained in:
Piotrek
2021-05-05 14:38:12 +02:00
parent 89934ba97c
commit c04a1aea11
10 changed files with 79 additions and 41 deletions
+26
View File
@@ -0,0 +1,26 @@
mod generator;
use generator::WorldGen;
mod chunk;
use chunk::WorldChunk;
mod block;
use block::WorldBlock;
pub struct World {
name: String,
chunks: Vec<WorldChunk> // Loaded chunks
}
impl World {
pub fn new(name: String) -> Self {
Self { name, chunks: Vec::new() }
}
fn load(&mut self) {
}
fn save(&mut self) {
}
}