fix checking algorithm
testing
update stats before showing game results
check cell before writing