I am creating a tic tac toe game and I came upon this error that I don\'t really understand: \"Missing return in a function expected to return \'(location:String, pattern:St
Since your return type is an optional, you could do this:
func rowcheck(value:Int)->(location:String, pattern:String)? {
var goodFinds = ["011","101","110"]
var findFuncs = [checktop, checkbottom, checkmidAcross, checkleft, checkmidDown, checkright, checkLRdiag, checkRLdiag]
for algor in findFuncs {
var algorResults = algor(value)
if find(goodFinds,algorResults.pattern) {
return algorResults
}
}
return nil
}