physicist.js 352 B

1234567891011121314
  1. var Physicist = function(snake, position, delay) {
  2. this.direction = 0;
  3. this.position = position;
  4. this.name = 'Fermi';
  5. this.bonus = '';
  6. this.snake = snake;
  7. this.delay = delay;
  8. };
  9. Physicist.prototype.collect = function(collectible) {
  10. this.bonus += " fat!";
  11. controller.score += collectible.points;
  12. controller.remove_collectible(collectible);
  13. };