Refactor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use rltk::{Algorithm2D, BaseMap, FontCharType, Point, RGB, Rltk};
|
||||
use rltk::{Algorithm2D, BaseMap, FontCharType, Point, Rltk, RGB};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use specs::prelude::*;
|
||||
|
||||
@@ -128,9 +128,7 @@ impl Algorithm2D for Map {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn draw_map(ecs: &World, ctx: &mut Rltk) {
|
||||
let map = ecs.fetch::<Map>();
|
||||
|
||||
pub fn draw_map(map: &Map, ctx: &mut Rltk) {
|
||||
let mut y = 0;
|
||||
let mut x = 0;
|
||||
for (idx, tile) in map.tiles.iter().enumerate() {
|
||||
|
Reference in New Issue
Block a user