adding win condition, and revealing empty cells algorithm