A simple Game of Life implementation in Java
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

22 行
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. }