We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PieceShape.I
Tetris.Game/Pieces/PieceGroupExtension.cs #L68 ~
foreach (var piece in group.Pieces) { var newX = (float)((piece.X - centerPosition.X) * Math.Cos(rotateRadian) - (piece.Y - centerPosition.Y) * Math.Sin(rotateRadian)); var newY = (float)((piece.X - centerPosition.X) * Math.Sin(rotateRadian) + (piece.Y - centerPosition.Y) * Math.Cos(rotateRadian)); piece.Position = centerPosition + new Vector2(newX, newY); if (group.PieceType == PieceShape.I) { switch (group.Rotation) { case 90: piece.Position += new Vector2(0, 30); break; case 180: piece.Position += new Vector2(-30, 0); break; case 270: piece.Position += new Vector2(0, -30); break; case 360: piece.Position += new Vector2(30, 0); break; } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Tetris.Game/Pieces/PieceGroupExtension.cs #L68 ~
The text was updated successfully, but these errors were encountered: