Ejemplo n.º 1
0
        static void ShowRenderedBoard(string renderedBoard)
        {
            string game = GameText.Generate(renderedBoard);

            Console.Clear();
            Console.WriteLine(game);
        }
Ejemplo n.º 2
0
        public static void ShowGame(Utils.Utils.Point animateHit = null, int hitRange = 1, Players.Player player = null)
        {
            string board = GameText.RenderBoard();

            if (animateHit == null)
            {
                ShowRenderedBoard(board);
            }
            else
            {
                AnimateHit(board, animateHit, hitRange);
            }
        }
Ejemplo n.º 3
0
        public static void GameWinScreen()
        {
            Players.CurrentPlayer.ShowEnemyBoard = true;
            Players.CurrentPlayer.Messages.Add($"\n\t CUNGRADULATION {Players.CurrentPlayer}! YOU ARE WINNER!");

            var rnd = new Random();

            while (!EnterPressed())
            {
                int range = (rnd.Next(3) == 0 ? 2 : 1);
                var p     = new Utils.Utils.Point(rnd.Next(Options.OPTIONS["Board height"]), rnd.Next(Options.OPTIONS["Board width"]));
                Boards.CurrentBoard.Explode(p, range);
                string board = GameText.RenderBoard();
                AnimateHit(board, p, range);
                ShowRenderedBoard(board);

                System.Threading.Thread.Sleep(rnd.Next(500));
            }

            Stop = true;
        }