用TDD(Test Driven Development)开发一个简单的猜数字游戏,基本业务逻辑如下:
游戏开始后,系统会随机给出一个四位,每位都不重复的数字作为答案。由用户输入自己猜测的四个数字。 系统会将两个数字进行对比,并给形出xAxB的提示, 比如”2A1B”。 如果数字猜对而且位置也对,就是一个A。 如果数字猜对但位置不对,就是一个B。 例如:
系统给出”1234”,
用户输入”1234”
返回”4A0B”
系统给出”1234”,
用户输入”4321”
返回”0A4B”
This project forked from seabornlee/guess-number
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.