Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public class Life {
  2.  
  3. private int generation;
  4.  
  5. public Life(LifeBoard board) {
  6.  
  7. public void newGeneration() {
  8. board.increaseGeneration();
  9.  
  10. }
  11.  
  12. public void flip(int row, int col) {
  13.  
  14. if(board.get(row, col) == true) {
  15. board.put(row, col,false);
  16. }
  17. else if(board.get(row, col) == false) {
  18. board.put(row, col,true);
  19. }
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement