GoralWMoro

Untitled

Apr 16th, 2020
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1. public class GraWzycia {
  2.     public class Board {
  3.         private int x;
  4.         private int y;
  5.         private Cell[][] plansza;
  6.  
  7.         public Board(int x, int y) {
  8.             plansza = new Cell[x][y];
  9.         }
  10.  
  11.         public void wstawKomórke(Cell cell){}
  12.  
  13.         public Board nowaEwolucja(){
  14.             return this;
  15.         }
  16.  
  17.  
  18.         public void rysujPlansze(){}
  19.  
  20.  
  21.     }
  22.     public class Cell{
  23.  
  24.         private boolean zywa;
  25.         private int x;
  26.         private int y;
  27.  
  28.         public Cell(int x, int y){
  29.             this.x = x;
  30.             this.y = y;
  31.             this.zywa = true;
  32.         }
  33.  
  34.         public void flipKomórka(){};
  35.  
  36.  
  37.         public boolean czyZywa(){
  38.             return zywa;
  39.         }
  40.        
  41.         public int liczbaSasiadow(Board board){
  42.             return 1;
  43.         }
  44.  
  45.  
  46.  
  47.  
  48.     }
  49.  
  50.     public static void main(String[] args) {
  51.  
  52.     }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment