Ejemplo n.º 1
0
        public void newGame()
        {
            int[] org = {
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99,
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99,
                        99,	124,	22,	23,	25,	126,	23,	22,	124,	99,
                        99,	21,	21,	21,	21,	21,	21,	21,	21,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	11,	11,	11,	11,	11,	11,	11,	11,	99,
                        99,	114,	12,	13,	15,	116,	13,	12,	114,	99,
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99,
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99 };

            board = new int[120];

            for (int i = 0; i < 120; i++)
                board[i] = org[i];

            // Quy dinh player
            isP1Run = true;
            player1 = new Player(Player.Type.Human,1);
            player2 = new Player(Player.Type.Human,2);

            ProcessMove = new Move();
        }
        public void newGame(string choose_player)
        {
            this.isRuning = true;
            int[] org = {
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99,
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99,
                        99,	124,22,	23,	25,	126,23,	22,	124,99,
                        99,	21,	21,	21,	21,	21,	21,	21,	21,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	11,	11,	11,	11,	11,	11,	11,	11,	99,
                        99,	114,12,	13,	15,	116,13,	12,	114,99,
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99,
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99 };

            board = new int[120];

            for (int i = 0; i < 120; i++)
                board[i] = org[i];

            // Quy dinh player
            isP1Run = true;
            player1 = new Player(Player.Type.Human,1);
            if (choose_player.ToLower() == "human")
                player2 = new Player(Player.Type.Human, 2);
            else
                player2 = new Player(Player.Type.Computer,2);

            ProcessMove = new Move();
            sound.NewGame();
            sound.isBgSound = true; //nhac nen
        }
Ejemplo n.º 3
0
        public void newGame()
        {
            this.isRuning = true;
            int[] org = {
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99,
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99,
                        99,	124,	22,	23,	25,	126,	23,	22,	124,	99,
                        99,	21,	21,	21,	21,	21,	21,	21,	21,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	00,	00,	00,	00,	00,	00,	00,	00,	99,
                        99,	11,	11,	11,	11,	11,	11,	11,	11,	99,
                        99,	114,	12,	13,	15,	116,	13,	12,	114,	99,
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99,
                        99,	99,	99,	99,	99,	99,	99,	99,	99,	99 };

            board = new int[120];

            for (int i = 0; i < 120; i++)
                board[i] = org[i];

            // Quy dinh player
            isP1Run = true;

            player1 = new Player(p1,1);
            player2 = new Player(p2,2);

            ProcessMove = new Move();
            sound.NewGame();
            sound.isBgSound = true; //nhac nen
        }