D
dennis11
Gast
Hallo,
ich möchte ein Programm in Java schreiben, dass die Wahrscheinlichkeiten beim Pokern ausrechnet.
ICh hab jetzt ein Problem, System.in.read anweisung funktioniert jedes zweite mal
Kann mit jemand helfen.
ich möchte ein Programm in Java schreiben, dass die Wahrscheinlichkeiten beim Pokern ausrechnet.
ICh hab jetzt ein Problem, System.in.read anweisung funktioniert jedes zweite mal
Kann mit jemand helfen.
Code:
import java.io.*;
public class dsjfhds {
public static void main(String[] args) throws IOException {
int zwei = 2;
int drei = 3;
int vier = 4;
int fuenf = 5;
int sechs = 6;
int sieben = 7;
int acht = 8;
int neun = 9;
int zehn = 10;
int bube = 11;
int dame = 12;
int könig = 13;
int ass = 14;
int herz;
int karo;
int pik;
int kreuz;
System.out.print("1. Karte ");
int Karte1 = System.in.read();
char a = (char) Karte1; //1. Karte
System.out.print("Farbe ");
int Farbe1 = System.in.read();
char b = (char) Farbe1; //Farbe
System.out.print("2. Karte ");
int Karte2 = System.in.read();
char c = (char) Karte2; //2. Karte
System.out.print("Farbe ");
int Farbe2 = System.in.read();
char d = (char) Farbe2; //Farbe
System.out.print("Flop ");
int FlopKarte1 = System.in.read();
char e = (char) FlopKarte1; //Flop Karte
System.out.print("Farbe ");
int FlopFarbe1 = System.in.read();
char f = (char) FlopFarbe1; //Flop Farbe
System.out.print("Flop ");
int FlopKarte2 = System.in.read();
char g = (char) FlopKarte2; //Flop Karte
System.out.print("Farbe ");
int FlopFarbe2 = System.in.read();
char h = (char) FlopFarbe2; //Flop Farbe
System.out.print("Flop ");
int FlopKarte3 = System.in.read();
char i = (char) FlopKarte3; //Flop Karte
System.out.print("Farbe ");
int FlopFarbe3 = System.in.read();
char j = (char) FlopFarbe3; //Flop Farbe
System.out.print("Turn ");
int Turn = System.in.read();
char k = (char) Turn; //Turn
System.out.print("Farbe ");
int TurnFarbe = System.in.read();
char l = (char) TurnFarbe; //Turn Farbe
System.out.print("River ");
int River = System.in.read();
char m = (char) River; //River
System.out.print("Farbe ");
int RiverFarbe = System.in.read();
char n = (char) RiverFarbe; //River Karte
System.out.print("1. Karte "+a);
System.out.println(" "+b);
System.out.print("2. Karte "+c);
System.out.println(" "+d);
System.out.print(e);
System.out.print(" "+f);
System.out.print(" "+g);
System.out.print(" "+h);
System.out.print(" "+i);
System.out.print(" "+j);
System.out.print(" "+k);
System.out.print(" "+l);
System.out.print(" "+m);
System.out.println(" "+n);;
}
}