A simple Game of Life implementation in Java
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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