-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
511a0c4
commit fa0a3ba
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |