A simple Game of Life implementation in Java
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 line
391 B

  1. package edu.stuy.goldfish;
  2. public class Patch {
  3. private int _pxcor, _pycor;
  4. private String _plabel;
  5. private Grid _myGrid;
  6. public Patch(Grid grid, int xcor, int ycor) {
  7. _myGrid = grid;
  8. _pxcor = xcor;
  9. _pycor = ycor;
  10. }
  11. public Patch () {
  12. this(new Grid(), 0, 0);
  13. }
  14. public String toString() {
  15. return _plabel;
  16. }
  17. }