/// <summary> /// Updates the view if only grid is provided. /// </summary> public void UpdateView(Grid grid, int score, bool isAlive, Point snakeHeadPoint) { IsAlive = isAlive; Score = score; GridGUI.Update(grid, snakeHeadPoint, isAlive); }
/// <summary> /// Updates the view if snake game is provided. /// </summary> public void UpdateView(SnakeGame snakeGame) { IsAlive = snakeGame.Snake.IsAlive; Score = snakeGame.Score; GridGUI.Update(snakeGame.Grid, snakeGame.Snake.Head.Point, snakeGame.Snake.IsAlive); }