This game is played by two players on one device. Each player will input their own secret number in two input fields. There are also two tables, one for Player 1 and one for Player 2.
In each table, there are three columns:
When both players have made their guesses, the tables will be populated with the data. The game is won when both the Positions Got and Numbers Got columns are 4.
If Player 1's secret number is 1234 and Player 2 guesses 2134, then all the numbers match but 2 and 1 got their place changed. So, the Positions Got will be 2 and the Numbers Got will be 4.
| Player 1 | Player 2 |
|---|---|
| 1234 | 2134 |
| Guess | 2134 |
| Positions Got | 2 |
| Numbers Got | 4 |
If Player 2's secret number is 4680 and Player 1 guesses 6134, then two numbers (4, 6) match but no position is correct. So, the Positions Got will be 0 and the Numbers Got will be 2.
| Player 1 | Player 2 |
|---|---|
| 6134 | 4680 |
| Guess | 6134 |
| Positions Got | 0 |
| Numbers Got | 2 |