Skip to content

mahmoud-masmoudi-dev/diglets

Repository files navigation

diglets

Mastermind-like game
Please find it the play store by clicking on the link below :
https://play.google.com/store/apps/details?id=com.m_square.diglets

A logic multiplayer game where one opponent should create a secret number, and the other player should guess it right by giving guess numbers. Secret number and guess numbers must respect the following rules :

  • Must have 4 distinct digits
  • Must not start with 0

The guessing player must find the secret number in the fewest guesses possible. For the time being, the game is in single mode, i.e., the only opponent is the AI. This game could have various future improuvements, such as using more digits in the number, using hexadecimal numbers, using firebase to create online gaming mode etc... For a given guess, the secret number player should reply with a combination of T and V letters : If the guess number has a correct digit in the right place (according to the secret number), this would give a T. If the guess number has a correct digit but in a wrong place (according to the secret number), this would give a V.

Example

If the secret number is, say, 3820, a guess of 6201 should be replied with VV, and a guess of 3980 should be replied with TTV

Single mode (digits)

In this mode, the secret number is generated by the AI, the player has a digits keyboard and must give guesses that respect the rules stated above

Single mode (letters)

In this mode, the secret number is generated by the player. The AI will try to guess the secret number by prompting a guess number. The player should respond correctly according to its secret number. If the player gives a wrong reply, either by mistake or in deliberate way, the AI may detect that the player is cheating :p