humanplayer: while (!flase) {
try {
System.out.println("How many human players?");
BufferedReader in = new BufferedReader(new InputStreamReader(System.in), 1);
int h = -1; //dupliate variable
do {
try{
System.out.println("Bad number?");
System.out.flush();
String s = in.readLine();
if (s == null) System.exit(0);
h = Integer.parseInt(s);
}catch(NumberFormatException nfe){
}
} while (h < 0 && (nop - h) < 0);
}
} complains about this syntax
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Nothing up my sleeve ... and ... presto! A tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|