// initialize game stuff
        private void initializeGame()
        {
            // create board
            BoardDrawables board_dc = new BoardDrawables
            {
                active_line   = Color.Black,
                inactive_line = Color.LightGray,
                background    = Color.LemonChiffon
            };

            board  = new Board(board_p, rowcnt_t, colcnt_t, board_dc);
            player = new Player[player_cnt];


            // create player 1
            PlayerDrawables player1_dc = new PlayerDrawables
            {
                player_p = player1_p,
                name_t   = player1_name_t,

                cells_l    = player1_cells_l,
                cell_cnt_l = player1_cell_cnt_l,

                score_l     = player1_score_l,
                score_cnt_l = player1_score_cnt_l,

                amblem = new AmblemX(Color.PowderBlue, Color.Black),

                active_frgnd = Color.PowderBlue,
                active_bkgnd = Color.RoyalBlue
            };

            player[0] = new Player(0, player1_dc);


            // create player 2
            PlayerDrawables player2_dc = new PlayerDrawables
            {
                player_p = player2_p,
                name_t   = player2_name_t,

                cells_l    = player2_cells_l,
                cell_cnt_l = player2_cell_cnt_l,

                score_l     = player2_score_l,
                score_cnt_l = player2_score_cnt_l,

                amblem = new AmblemO(Color.Orange, Color.Black),

                active_frgnd = Color.Orange,
                active_bkgnd = Color.Coral
            };

            player[1] = new Player(1, player2_dc);


            // set player active statuses
            player[0].setActiveStatus(true);
            player[1].setActiveStatus(false);
        }
Beispiel #2
0
 // create a player
 public Player(int id, PlayerDrawables drawables)
 {
     this.id        = id;
     this.drawables = drawables;
 }