Пример #1
0
        // Use this for initialization
        void Start()
        {
            var bytes = new byte[10];

            new RNGCryptoServiceProvider().GetBytes(bytes);
            _shuffleSeeds = bytes.Select(a => (int)a).ToList();


            var deckFactory = new DeckFactory(new MBCardFactory(CardPrefab));

            _handFactory = new HandFactory(deckFactory, _shuffleSeeds);

            FourPlayer.OnPlayerJoined += player =>
            {
                DebugConsole.Log(String.Format("player {0} joined", player.Id));
                _players.Add(player);
            };
            FourPlayer.OnPlayerLeft += player =>
            {
                DebugConsole.Log(String.Format("player {0} left", player.Id));
                _players.Remove(player);
            };

            SeatManager.OnAllPlayersSeated += () =>
            {
                DebugConsole.Log("All Players Seated, starting game.");
                _firstPlayerToBid = _players.Shuffle(new Random()).First().Id;
                _playersSeated    = true;
            };
        }
 public PlayingPositions(IHandFactory hand_factory)
 {
     _cards_dealt  = false;
     _hand_factory = hand_factory;
     _hands        = new List <IHand>();
 }
 private PlayingPositions()
 {
     _hand_factory = new HandFactory();
 }
 public PlayingPositions(IHandFactory hand_factory) 
 {
     _cards_dealt = false;
     _hand_factory = hand_factory;            
     _hands = new List<IHand>();
 }        
 private PlayingPositions()
 {
     _hand_factory = new HandFactory();
 }