UNPKG

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 :)

23 lines (22 loc) 973 B
import { OnInit } from '@angular/core'; import { GameManagerService } from './services/game-manager.service'; import * as i0 from "@angular/core"; export declare class NgxSnakeComponent implements OnInit { private _manager; boardHeight: number; boardWidth: number; foodEaten: import("rxjs").Subject<unknown>; gameOver: import("rxjs").Subject<unknown>; grid$: import("rxjs").Observable<import("./definitions").GameGrid>; constructor(_manager: GameManagerService); ngOnInit(): void; actionUp(): void; actionRight(): void; actionDown(): void; actionLeft(): void; actionStart(): void; actionStop(): void; actionReset(): void; static ɵfac: i0.ɵɵFactoryDeclaration<NgxSnakeComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NgxSnakeComponent, "ngx-snake", never, { "boardHeight": "boardHeight"; "boardWidth": "boardWidth"; }, { "foodEaten": "foodEaten"; "gameOver": "gameOver"; }, never, never>; }