Write the rotate method of the MatrixRotator class that accepts one argument, direction. rotate must set the object's matrix property with a new, rotated matrix.
Rotating a matrix clockwise will rotate every element to it's clockwise position.
example matrix rotation: original
a b c
d e f
g h i
rotated clockwise (CW)
g d a
h e b
i f c
rotated clockwise (CW) once more
i h g
f e d
c b a
Once your tests pass, you can move on to the advanced
branch.
merge advanced
into your current master
branch. Follow instructions in the README.
npm i
There are 4 tests, make the tests pass.
npm test