示例#1
0
        public MainScreen(int screenWidth, int screenHeight, GameCredit gameCredit)
        {
            List <Card> emptyCards = GetEmptyCards();

            ScreenWidth  = screenWidth;
            ScreenHeight = screenHeight;
            _gameCredit  = gameCredit;

            _cardsControl   = new CardsControl(emptyCards);
            _stopControl    = new StopControl(emptyCards);
            _messageControl = new MessageControl(ScreenWidth);

            _controls = new List <IControl>
            {
                new BoardControl(_gameCredit),
                new CreditControl(ScreenWidth, ScreenHeight, _gameCredit),
                new ChipControl(ScreenWidth, ScreenHeight, _gameCredit),
                _cardsControl,
                _messageControl,
                _stopControl
            };

            _handService = new HandService();

            InitScreen();
        }
示例#2
0
 public Game(int screenWidth, int screenHeight, int currentCredit, int currentChip)
 {
     ScreenWidth  = screenWidth;
     ScreenHeight = screenHeight;
     _gameCredit  = new GameCredit(currentCredit, currentChip);
 }
示例#3
0
 public ChipControl(int screenWidth, int screenHeight, GameCredit gameCredit)
 {
     ScreenWidth  = screenWidth;
     ScreenHeight = screenHeight;
     _gameCredit  = gameCredit;
 }
示例#4
0
 public BoardControl(GameCredit gameCredit)
 {
     _gameCredit = gameCredit;
 }