Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo n.º 3
0
        public static void LoadHeadings(Game game, FrmGame Frm)
        {
            Player p1 = game.Players[0];
            Player p2 = game.Players[1];

            string NameP1  = p1.Name;
            Color  ColorP1 = p1.GetPlayerColor();

            string NameP2  = p2.Name;
            Color  ColorP2 = p2.GetPlayerColor();

            Frm.LblPlayer1_update(NameP1, ColorP1);
            Frm.LblPlayer2_update(NameP2, ColorP2);
            Frm.LblPlayer1Wins_updateText(p1.Wins);
            Frm.LblPlayer2Wins_updateText(p2.Wins);
            Frm.LblPlayer1Wins_updateColor(ColorP1);
            Frm.LblPlayer2Wins_updateColor(ColorP2);

            Frm.LblMessage_update("", Color.Black);
            Frm.LblMessage_hide();
        }