Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: Java | Size: 0.50 KB | Hits: 122 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. package algorytmylab4;
  2. import java.util.Random;
  3.  
  4.  
  5. public class Main
  6. {
  7.  
  8.    
  9.     public static void main(String[] args)
  10.     {
  11.         Lista lista = new Lista();
  12.         Random r = new Random();
  13.  
  14.         while(r.nextInt(14) != 0)
  15.         {
  16.             int wartosc = r.nextInt(13)+1;
  17.             int kolor = r.nextInt(4);
  18.             Karta k = new Karta(wartosc,kolor);
  19.             Wezel w = new Wezel(k);
  20.             lista.dodaj(w);
  21.            
  22.         }
  23.         lista.wyswietl();
  24.  
  25.  
  26.     }
  27.  
  28. }