physicist.js 324 B

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