day_14

Types

pub type Robot {
  Robot(pos: Vec2, vel: Vec2)
}

Constructors

  • Robot(pos: Vec2, vel: Vec2)
pub type Space {
  Space(width: Int, height: Int)
}

Constructors

  • Space(width: Int, height: Int)
pub type Vec2 {
  Vec2(x: Int, y: Int)
}

Constructors

  • Vec2(x: Int, y: Int)

Functions

pub fn get_quadrant_counts(
  robots: List(Robot),
  space: Space,
) -> #(Int, Int, Int, Int)
pub fn get_quadrants(
  robots: List(Robot),
  space: Space,
) -> List(List(Robot))
pub fn highest_row_count(robots: List(Robot)) -> Int
pub fn main() -> Nil
pub fn move_robot(
  robot: Robot,
  seconds: Int,
  space: Space,
) -> Robot
pub fn parse_robot(line: String) -> Robot
pub fn print_quadrants(
  quadrants: List(List(Robot)),
  space: Space,
  seconds: Int,
) -> List(List(Robot))
pub fn print_robots(
  robots: List(Robot),
  space: Space,
  seconds: Int,
) -> List(Robot)
Search Document