Skip to content

Simple 1A2B game, this is my java practice program...

Notifications You must be signed in to change notification settings

Bob-YsPan/Simple-1A2B-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Simple 1A2B Java Game

Introduction

簡單的Java練習小程式
只能用命令列執行
玩法可以參見
https://zh.wikipedia.org/wiki/猜数字#玩法
note:程式允許0當字首,亂數產生時會出現0字首的數字

My simple Java practice program
Only can run in the terminal(Or Windows command prompt)
Can view https://en.wikipedia.org/wiki/Bulls_and_Cows to see how to play
note:The program allows 0 to be the first word. Also computer generating random number mode.
(Sorry for my bad English...)

How to run program?

  • 首先你需要有一個可以執行Java的環境,可以用下列指令來檢查。
    java -version
  • 程式有兩個模式,可以透過載入引數來改變。 執行指令如下
    • "電腦產生亂數"模式(不帶引數也是這個模式):
      java -jar 1A2B.jar
      java -jar 1A2B.jar rand
    • "手動輸入模式",允許輸入答案,接著進行猜題,適合你出我猜的情境
      java -jar 1A2B.jar getnum



  • First you need install Java or JDK on your computer. To check it you can use command below:
    java -version
  • This program has two modes. To change it you can add argument like this:
    java -jar 1A2B.jar
    or
    java -jar 1A2B.jar rand
    to start "Computer generated random numbers" mode, computer generate random number and guess it.

    java -jar 1A2B.jar getnum
    to start "Manual input answer" mode, you can input answer number and other people to guess.

About

Simple 1A2B game, this is my java practice program...

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages