Exemple #1
0
 public bool CanRotate(Tetrimino tetrimino, Rotation rotation)
 {
     return(rotation switch
     {
         Rotation.CLOCKWISE => CanRotateDir(tetrimino, tetrimino.ClockwiseRotation()),
         Rotation.REVERSE => CanRotateDir(tetrimino, tetrimino.ReverseRotation()),
         Rotation.FLIP => CanRotateDir(tetrimino, tetrimino.FlipRotation()),
         _ => false,
     });