use my_raylib as raylib;

fn main() {
    let screen = raylib::Vector2 { x: 800.0, y: 600.0 };
    let mut pos = raylib::Vector2 {
        x: screen.x / 2.0,
        y: screen.y / 2.0,
    };
    raylib::init_window(screen.x as u32, screen.y as u32, "Hello, raylib");
    raylib::set_target_fps(60);

    while !raylib::window_should_close() {
        raylib::begin_drawing();
        raylib::clear_background(raylib::colors::BLACK);

        if raylib::is_key_down(raylib::Key::W) {
            pos.y -= 10.0;
        } else if raylib::is_key_down(raylib::Key::S) {
            pos.y += 10.0;
        } else if raylib::is_key_down(raylib::Key::A) {
            pos.x -= 10.0;
        } else if raylib::is_key_down(raylib::Key::D) {
            pos.x += 10.0;
        }

        raylib::draw_rect(pos.x as u32, pos.y as u32, 100, 100, raylib::colors::RED);
        raylib::end_drawing();
    }
}
