Checking whether a game board is full
You can apply forall to most containers to test if every element in the container satisfies some property. forall will only evaluate x + 1 if x is true. This type of evaluation is known as short-circuit evaluation. So basically we can use this property to perform the same behavior as the if-then statement in the original code.

Notice also that I've used pattern matching to get rid of the isInstanceOf[T]. 

def isFull: Boolean =
  getGrid.indices.forall(x =&gt;
    getGrid(x).indices.forall(y =&gt;
      getGrid(x)(y).getState match {
        case xyState: Undecided =&gt; False
        case _ =&gt; True
      }
    )
  )