private ControlBlocks AdjustBlocksForSpinLoop(ControlBlocks controlBlocks) { for (var i = 0; i <= controlBlocks.Blocks.BlockList.Count; i++) { if (CollisionDetection.IsCollisionControlBlocksLeftSide(controlBlocks)) { controlBlocks.MoveRight(); continue; } if (CollisionDetection.IsCollisionControlBlocksRightSide(controlBlocks)) { controlBlocks.MoveLeft(); continue; } if (CollisionDetection.IsCollisionControlBlocksLower(controlBlocks)) { controlBlocks.MoveUp(); continue; } break; } return(controlBlocks); }
public ControlBlocks AdjustBlocksByPutBlocks(ControlBlocks controlBlocks) { for (var i = 0; i <= controlBlocks.Blocks.BlockList.Count; i++) { if (CollisionDetection.IsCollisionPutPosition(controlBlocks)) { controlBlocks.MoveUp(); continue; } break; } return(controlBlocks); }