Hints on how to reduce your cyclomatic complexity:
if (isWon) { break; }at the end of the outer loop is the same as&& !isWoninside the guard of the loop.if (value == null) { continue; }before the inner loop is the same as&& (value ==!= null)in the guard of the loop.