TeZ LIFE/FORMS workshop info + code
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.

32 lines
849 B

2 years ago
  1. class Blob {
  2. ArrayList<Integer> blobX = new ArrayList<Integer>(); // X coordinates
  3. ArrayList<Integer> blobY = new ArrayList<Integer>(); // Y coordinates
  4. ArrayList<Integer> blobS = new ArrayList<Integer>(); // # of sections
  5. ArrayList<Integer> blobA = new ArrayList<Integer>(); // Area in pixels
  6. boolean isPacMan = false; // Pacman flag
  7. Blob (int bX, int bY, int bS, int bA, boolean selected) // Constructor
  8. {
  9. blobX.add(bX);
  10. blobY.add(bY);
  11. blobS.add(bS);
  12. blobA.add(bA);
  13. isPacMan = selected;
  14. }
  15. void addXYSA(int X, int Y, int S, int A) // add coordinates
  16. {
  17. blobX.add(X);
  18. blobY.add(Y);
  19. blobS.add(S);
  20. blobA.add(A);
  21. }
  22. void togglePacMan() {
  23. if(isPacMan) {
  24. isPacMan = false;
  25. } else {
  26. isPacMan = true;
  27. }
  28. }
  29. }