updated from for-loop to for-each loop from the Board Class