GithubHelp home page GithubHelp logo

guess-number-1's Introduction

guess-number-1

用TDD(Test Driven Development)开发一个简单的猜数字游戏,基本业务逻辑如下:

游戏开始后,系统会随机给出一个四位,每位都不重复的数字作为答案。由用户输入自己猜测的四个数字。 系统会将两个数字进行对比,并给形出xAxB的提示, 比如”2A1B”。 如果数字猜对而且位置也对,就是一个A。 如果数字猜对但位置不对,就是一个B。 例如:

系统给出”1234”,
用户输入”1234”
返回”4A0B”
系统给出”1234”,
用户输入”4321”
返回”0A4B”

guess-number-1's People

Contributors

seabornlee avatar yhl221 avatar

Watchers

 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.