Exemplo n.º 1
0
        public static void Draw(Game game, FrmGame Frm)
        {
            string message = "Empate!";

            Frm.LblMessage_update(message, Color.Black);
            Frm.LblMessage_show();
            Frm.LblArrowP1_hide();
            Frm.LblArrowP2_hide();
        }
Exemplo n.º 2
0
        public static void Winner(string GameWinnerPosition, Player player, Game game, FrmGame Frm)
        {
            switch (GameWinnerPosition)
            {
            case "Horizontal1":
                HorizontalBold(0, game);
                break;

            case "Horizontal2":
                HorizontalBold(1, game);
                break;

            case "Horizontal3":
                HorizontalBold(2, game);
                break;

            case "Vertical1":
                VerticalBold(0, game);
                break;

            case "Vertical2":
                VerticalBold(1, game);
                break;

            case "Vertical3":
                VerticalBold(2, game);
                break;

            case "Diagonal1":
                Diagonal1Bold(game);
                break;

            case "Diagonal2":
                Diagonal2Bold(game);
                break;
            }

            string message = player.Mark.ToString() + " é o vencedor";

            Frm.LblMessage_update(message, player.GetPlayerColor());
            Frm.LblMessage_show();

            Frm.LblArrowP1_hide();
            Frm.LblArrowP2_hide();
        }