import java.io.File;
import java.io.BufferedReader;
public class nDigit {
static int hit, blow;
static int num, max;
static int change;
static int number;
static int num_set;// 数値の数を格納する変数
static int max_set;// 乱数の最大値を格納する変数
static int[] array;// 設定数値を格納する変数
static int x, y;
static int i, j, k, m, n, q;// ループ用変数
static String[] input_num;
static String input;
static String[] record;
static File fl;
static File file;
}
public class Input extends nDigit {
void input() throws IOException {
System.out.println("数値を入力してください。(hを入力すると入力履歴が見られます)"); System.out.println("(入力した数値のあとに「,」をつけてください)"); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); input = br.readLine();
/********************************************
//ここでエラーがでます。
record[number] = input;
*********************************************/
input_num = input.split(","); }
}
public class Main {
public static void main(String[] args) throws IOException { // インスタンス化 RandMake random_main = new RandMake();// 乱数生成 Set set = new Set();// Input in = new Input();// Answer ans = new Answer();// set.set();// random_main.rand(); System.out.println("設定完了"); System.out.println("Gameを開始します!"); System.out.println(""); nDigit.hit = 0; while (nDigit.hit != nDigit.max) { // 初期化 nDigit.hit = 0; nDigit.blow = 0; in.input(); nDigit.number++;//ループ回数を記録 ans.answer(); } System.out.println(nDigit.num + "hit!!!"); System.out.println("あなたの勝利です。"); }
}
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/04/22 09:37
2016/04/23 06:53