The game logic is simple, you think of a four digit number with unique digits example:(5689). You can't use the same digit twice for example:(5589) is not allowed.
And your goal is to guess your friend's number before he guesses yours, each turn you give your guess and if a digit is in the right place that's a hit if the digit does exist but the position is wrong that's a miss , and of course to win you need to score 4 hits which means you guessed the number correctly .