game guessing logic