public void game() {
    c=2;
if(c==2){ 
    a=2;
while (q<145) {
updateWorld();
paint(getGraphics());
try {
Thread.sleep(SZYBKOSC);
} catch (InterruptedException e) {}

}
q=0;
System.out.println("Przeszkoda, wpisz 3, zeby ominac");
int c = in.nextInt();
 
if(c==3){
a=3;
while (q<400) {
updateWorld();
paint(getGraphics());
try {
Thread.sleep(SZYBKOSC);
} catch (InterruptedException e) {}

}
System.out.println("Przeszkoda ominieta");
}}
}