public override void NextFrame(Drawer d) { if (drawBorder) { this.border = d.CreateBorder(ConfigStorage.Current.SnakeGameBorderChar.Value, Padding); drawBorder = false; } if (snake.IsDead(FieldSize, Padding)) { selectGameOverAction(d); return; } if (IsPaused) { d.Create(MenuPaused); CheckPausedMenuSomethingSelected(d); } if (!IsPaused) { MoveSnake(); } if (!isGameOver) { d.Create(snake); d.Create(apple); d.Create(progress.StatusBar); } }
public override void NextFrame(Drawer d) { if (IsPaused) { d.Create(MenuPaused); CheckPauseMenuSomethingSelected(d); return; } else { d.Remove(MenuPaused); } if (playGround.GameOver) { playGround.IsFocused = false; d.Create(GameOverActionMenu); UserSelectionOnPlaygroundFilled(d); return; } this.border = d.CreateBorder(ConfigStorage.Current.TetrisBorderChar.Value, new Padding( leftBorderPlayground, FieldSize.Width - rightBorderPlayground, Padding.Top, Padding.Bottom)); playGround.NextFrame(); rf.ChangeNextTetromino(playGround.NextTetromino); rf.SetScore(playGround.Score); d.Create(rf); d.Create(playGround); playGroundDrawn = playGround.ElementContent; }