Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alirmemon37 committed Aug 30, 2023
1 parent 511a0c4 commit fa0a3ba
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# Chandrayaan 3 TDD Assessment

## Assessment Link

[Chandrayaan 3 TDD Assessment](https://blog.incubyte.co/blog/chandrayaan-3-tdd-assessment/)

## Intuition
We can not determine the correct position in 3-D space by only maintaining a single side of Chandrayaan.

At each step, we maintain two sides of Chandrayaan (the **direction** side and the **facing** side, which is perpendicular to the direction side) to determine the final position and direction of Chandrayaan in 3-D space.

- **Move Forward/Backward**

Moving forward involves moving forward by 1 and moving backward by 1 in the **respective axis** in the pointing direction, while the facing side remains the same.

- **Turn Left/Right**

When turning left/right in the **horizontal** plane, i.e., when the facing side is either U or D, Chandrayaan turns in its respective direction, and the **facing side remains unchanged**.

- **Rotate Up/Down/Left/Right**

When rotating in any direction in the **galactic** (vertical) plane, both the direction side and the facing side change.

0 comments on commit fa0a3ba

Please sign in to comment.