Beispiel #1
0
        public void StartNewGame()
        {
            BoardGame       = new Grid();
            List            = new List <TriangleUiEl>(new TriangleUiEl[24]);
            BackgammonLogic = BackgammonController.Singlton
            ;
            Bar = new BarViewModel();
            BackgammonLogic.GetDiceRolls();

            InitializeList();
            SetGridRowAndColumns();
            SetBoardLayout();
            SetTriangle();
            InitializeBoard();
        }
        private void InitializeCustomComponents()
        {
            GameController = new BackgammonController();

            TrianglesPictureBoxes = new List <PictureBox>(new PictureBox[24]);
            InitializePictureBoxListReferences();

            for (int i = 0; i < TrianglesPictureBoxes.Count; i++)
            {
                InitializePictureBoxTriangle(i);
            }

            blackBarHalfPictureBox.BackColor = Color.Transparent;
            blackBarHalfPictureBox.Parent    = boardPictureBox;

            redBarHalfPictureBox.BackColor = Color.Transparent;
            redBarHalfPictureBox.Parent    = boardPictureBox;

            redCheckersBearOff.BackColor   = Color.Transparent;
            blackCheckersBearOff.BackColor = Color.Transparent;
            redCheckersBearOff.Visible     = false;
            blackCheckersBearOff.Visible   = false;
        }