game/game_logic library

Functions

addNewFood(Set<Food> foods, GameMap gameMap) → void
eatFood(Point foodPoint, Set<Food> foods, Snake snake, GameMap gameMap) → void
gameOver({bool isWon = false}) → void
handleInput(int byte, List<Direction> inputQueue, bool isPaused) → void
isValidDirection(Direction newDir, Direction dir) bool
updateDirectionChange(Direction dir, Snake snake, GameMap gameMap, Set<Food> foods) → void