private bool AnyValidDrops(PlayerColor playerColor, DropCheckmateLevel recursionLevel, IEntitiesDB entitiesDB) { bool returnValue = false; List <HandPieceEV> teamHandPieces = handService.FindAllTeamHandPieces(playerColor, entitiesDB).Where(handPiece => handPiece.HandPiece.NumPieces.value > 0).ToList(); for (int rank = 0; rank < BoardConst.NUM_FILES_RANKS; ++rank) { for (int file = 0; file < BoardConst.NUM_FILES_RANKS; ++file) { foreach (HandPieceEV handPiece in teamHandPieces) { Vector2 location = new Vector2(file, rank); if (DropPossible(handPiece, location, playerColor, recursionLevel, entitiesDB)) { returnValue = true; goto ReturnLocation; // Break out of all the for loops } } } } ReturnLocation: return(returnValue); }