functional guess the number game