use battlesnake_game_types::types::Move;
use serde::{Deserialize, Serialize};

pub mod logic;

#[derive(Debug, Deserialize, Serialize)]
pub struct Response {
    /// In which direction the snake should move
    r#move: &'static str,
}

impl Response {
    #[must_use]
    pub const fn new(value: Move) -> Self {
        Self {
            r#move: match value {
                Move::Left => "left",
                Move::Down => "down",
                Move::Up => "up",
                Move::Right => "right",
            },
        }
    }
}
