ngx-snake
Version:
Snake game as an angular component, its only the core of the game... you need to add everything around it (controls, score...) yourself :)
21 lines (20 loc) • 376 B
TypeScript
export declare type GameGrid = Array<Array<TileState>>;
export declare enum GameState {
Paused = 0,
Started = 1,
Over = 2
}
export declare enum TileState {
Free = "free",
Head = "head",
Body = "body",
Tail = "tail",
Wall = "wall",
Food = "food"
}
export declare enum MoveDirections {
UP = 0,
RIGHT = 1,
DOWN = 2,
LEFT = 3
}