added functions to check if game is over (and solved or not) (not used yet)