Coder Social home page Coder Social logo

cows-and-bulls's Introduction

Cows and bulls implementation.

Rules: A 4 digit sequence of numbers is generated. This will be called the "secret". The player must try to guess this sequence exactly within the fewest guesses possible. A digit in the guess can match a digit in the secret in two ways: 1) exactly, and 2) nearly.

  • An exact match means that a digit in the guess is in the same place as that of the secret. e.g. Secret = 1423, Guess = 1099, Exact matches = 1 (the first digit of the guess matches the first digit of the secret)
  • A near match means that a digit in the guess is present within the secret, but only if that digit has not already been near matched or isn't an exact match

TODO:

  • Secret validation (correct length, valid characters)
  • Consider menu implementation for looping (quit on key) and options (configure game, e.g. secret seed)
  • Add config for secret length (configurable across the program)
  • Secret generator (uses seed, or default)
  • io for console(?)
  • Dockerise app (lets us use ECS and expand the app)

cows-and-bulls's People

Contributors

tjones-ap avatar

Stargazers

Tom Jones avatar

Watchers

Tom Jones avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.