Пример #1
0
        public Board(Game game, Texture2D picture, DrawState state, Player[] players = null, BoardData boardData = null)
            : base(game, picture, state)
        {
            if (players != null) _players = players;
            if (boardData == null) boardData = new BoardData();

            InitParameters();
            InitAndLoadContent(game, boardData);
        }
Пример #2
0
        private void InitAndLoadContent(Game game, BoardData boardData)
        {
            _click = game.Content.Load<SoundEffect>("misc_menu_4");
            _clickError = game.Content.Load<SoundEffect>("negative_2");

            InitChessButton(game);
            InitGoalButton(game);
            InitChess(game, boardData.Hare, _hare, game.Content.Load<Texture2D>("Rabbit"),
                Chess.Type.Hare);
            InitChess(game, boardData.Tortoise, _tortoise, game.Content.Load<Texture2D>("Turtle"),
                Chess.Type.Tortoise);
        }