rust-ufo/src/tank.rs

26 lines
510 B
Rust

use crate::movable::Movable;
use crate::{Direction, TANK_STR, WIDTH};
pub struct Tank {
column: u16,
}
impl Movable<Tank> for Tank {
fn create() -> Tank {
let column = (WIDTH - TANK_STR.len() as u16) / 2;
Tank { column }
}
fn mov(&mut self, direction: Direction) {
todo!("Implement tank movement")
}
fn draw(&self) {
todo!("Implement drawing tank")
}
fn is_on_screen(&self) -> bool {
todo!("Implement tank visibility check")
}
}