snake-cli-ts
Version:
Nodejs cli snake game
20 lines (19 loc) • 531 B
TypeScript
import Point from '../helpers/Point';
import FoodManager from './FoodManager';
interface EatEvent {
preventDefault: () => void;
}
interface IFoodSettings {
point: Point;
symbol: string;
onEat?: (this: Food, e: EatEvent) => void | boolean;
}
export default class Food {
foodManager: FoodManager;
point: Point;
symbol: string;
onEat?: (this: Food, e: EatEvent) => void | boolean;
constructor(foodSettings: IFoodSettings, foodManager: FoodManager);
use(): void;
}
export {};