New answers tagged

0

Alternatively, you could store four different pre-defined rotations and swap amongst them.


0

I found a solution, I am posting it just in case. Basically I removed the method rotatePiece(), instead of that I have a method that calculates the rotation independently of drawing: void PieceZ::getRotation() { newX1 = (y1-y2) + x2; newY1 = (x2-x1) + y2; newX3 = (y3-y2) + x2; newY3 = (x2-x3) + y2; newX4 = (y4-y2) + x2; newY4 = (x2-x4) + y2; ...



Top 50 recent answers are included