flipping works correctly and user is alerted if they win