private TetrisState TryRotatePiece(TetrisState state) { if (State != GameState.Running) { return(state); } TryRotatePieceResult result = BoardLogic.TryRotatePiece(state); TetrisState newState = GetState(); return(newState); }
internal TryRotatePieceResult TryRotatePiece(TetrisState state) { TryRotatePieceResult result = new TryRotatePieceResult(); lock (PieceMoveLock) { SetState(state); if (CanRotatePiece()) { RotatePiece(); result.Rotated = true; } } return(result); }