Sha256: 814793562350c748ec2369f0bfa8f066358fead9c14ba0e93077bb606f763a00
Contents?: true
Size: 900 Bytes
Versions: 69
Compression:
Stored size: 900 Bytes
Contents
defmodule RobotSimulator do @doc """ Create a Robot Simulator given an initial direction and position. Valid directions are: `:north`, `:east`, `:south`, `:west` """ @spec create(direction :: atom, position :: {integer, integer}) :: any def create(direction \\ nil, position \\ nil) do end @doc """ Simulate the robot's movement given a string of instructions. Valid instructions are: "R" (turn right), "L", (turn left), and "A" (advance) """ @spec simulate(robot :: any, instructions :: String.t()) :: any def simulate(robot, instructions) do end @doc """ Return the robot's direction. Valid directions are: `:north`, `:east`, `:south`, `:west` """ @spec direction(robot :: any) :: atom def direction(robot) do end @doc """ Return the robot's position. """ @spec position(robot :: any) :: {integer, integer} def position(robot) do end end
Version data entries
69 entries across 69 versions & 1 rubygems