On the game begin computer randomly selects N colours from MAX count and store this as secret row. Task for player is to guess correct row with placing own choices in every round. On the round end, computer tells with GREENs points how many colors are on right places and with REDs how many are correct colour in wrong place. This should help the player in next row. You can adjust the game difficulty to match yours skill...