there is no turning back
This commit is contained in:
@@ -108,14 +108,6 @@ let rotate_dir_left dir =
|
||||
| 'v' -> '>'
|
||||
| _ -> raise (Invalid_argument "Invalid direction")
|
||||
|
||||
let rotate_dir_back dir =
|
||||
match dir with
|
||||
| '<' -> '>'
|
||||
| '>' -> '<'
|
||||
| '^' -> 'v'
|
||||
| 'v' -> '^'
|
||||
| _ -> raise (Invalid_argument "Invalid direction")
|
||||
|
||||
let walk_forward state =
|
||||
{state with pos = add_int_pair state.pos (get_dir_vector state.dir); score = state.score + 1 }
|
||||
|
||||
|
Reference in New Issue
Block a user