An open API service indexing awesome lists of open source software.

https://github.com/nanmu42/guess-number

使用Rust实现的一个按大小反馈猜数字的游戏
https://github.com/nanmu42/guess-number

rust rust-lang tutorial

Last synced: about 1 year ago
JSON representation

使用Rust实现的一个按大小反馈猜数字的游戏

Awesome Lists containing this project

README

          

# Guess Number

使用Rust实现的一个按大小反馈猜数字的游戏。

# 例子

```
我会在1到100想一个数,看你几轮可以猜中它! :)
这是你的第1次尝试。
请输入你的猜测:
50
你猜的数字是50
太小了! :P
这是你的第2次尝试。
请输入你的猜测:
70
你猜的数字是70
太小了! :P
这是你的第3次尝试。
请输入你的猜测:
90
你猜的数字是90
太大了! :P
这是你的第4次尝试。
请输入你的猜测:
80
你猜的数字是80
太小了! :P
这是你的第5次尝试。
请输入你的猜测:
85
你猜的数字是85
太小了! :P
这是你的第6次尝试。
请输入你的猜测:
89
你猜的数字是89
太大了! :P
这是你的第7次尝试。
请输入你的猜测:
88
你猜的数字是88
恭喜你猜对了!
```

# 参考资料

* [The Rust Programming Language](https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html)