fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. class ProstyPortalGra {
  8. public static void main(String[] args) {
  9. int iloscRuchow = 0;
  10. PomocnikGry pomocnik = new PomocnikGry();
  11.  
  12. ProstyPortal portal = new ProstyPortal();
  13. int liczbaLosowa = (int) (Math.random() * 5);
  14.  
  15. int[] polozenie = {liczbaLosowa, liczbaLosowa+1, liczbaLosowa+2};
  16. portal.setPolaPolozenia(polozenie);
  17. boolean czyIstnieje = true;
  18.  
  19. while (czyIstnieje == true) {
  20. String pole = pomocnik.pobierzDaneWejsciowe("Podaj liczbę");
  21. String wynik = portal.sprawdz(pole);
  22. iloscRuchow++;
  23. if (wynik.equals("zatopiony")) {
  24. czyIstnieje = false;
  25. System.out.println(iloscRuchow + " ruchów");
  26. } // koniec if
  27. } // koniec while
  28. } // koniec main
  29. }
Compilation error #stdin compilation error #stdout 0.06s 380224KB
stdin
Standard input is empty
compilation info
Main.java:10: error: cannot find symbol
  PomocnikGry pomocnik = new PomocnikGry();
  ^
  symbol:   class PomocnikGry
  location: class ProstyPortalGra
Main.java:10: error: cannot find symbol
  PomocnikGry pomocnik = new PomocnikGry();
                             ^
  symbol:   class PomocnikGry
  location: class ProstyPortalGra
Main.java:12: error: cannot find symbol
  ProstyPortal portal = new ProstyPortal();
  ^
  symbol:   class ProstyPortal
  location: class ProstyPortalGra
Main.java:12: error: cannot find symbol
  ProstyPortal portal = new ProstyPortal();
                            ^
  symbol:   class ProstyPortal
  location: class ProstyPortalGra
4 errors
stdout
Standard output is empty