DEV Community

Pavel Ermakov
Pavel Ermakov

Posted on

6

I have created a game with React-Native

It's been a challenge, but I've finally finished my game. "Bulls and Cows" is a fun game, used a lot in math and science for teaching algorithms. The rules are simple:

  • The AI thinks of a number, while the player tries to guess it.
  • The number to be guessed must be a 4 digit number, using digits from 0 to 9, each digit at most once. e.g. 1234 is valid, but 1233 is not valid.
  • For every guess that the player makes, he gets 2 values - the number of bulls and the number of cows. 1 bull means the guess contains and the target number have 1 digit in common, and in the correct position. 1 cow means the guess and the target have 1 digit in common, but not in correct position. e.g. Let the target be 1234. Guessing 4321 will give 0 bulls and 4 cows. 3241 will give 1 bull and 3 cows. 4 bulls means you have won the game!

I've spiced it up with bright colors and animations.

iOS:
Alt Text

Android:
Alt Text

Repo: https://github.com/pavermakov/bulls-and-cows

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay