use std::rc::Rc; use skunk2d::{HexMap, Image, Vec2}; use crate::unit_kind::UnitKind; pub struct Unit { pub kind: Rc, pub pos: Vec2 } impl Unit { pub fn draw(&self, target: &mut Image, map: &HexMap) { target.draw_image( map.coord_to_pixel(self.pos), &self.kind.sprite); } }