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.

16 lines
302 B

  1. public class Patch {
  2. private int _pxcor, _pycor;
  3. private String _plabel;
  4. private Grid _myGrid;
  5. public Patch(Grid grid, int xcor, int ycor) {
  6. _myGrid = grid;
  7. _pxcor = xcor;
  8. _pycor = ycor;
  9. }
  10. public String toString() {
  11. return _plabel;
  12. }
  13. }