Esempio n. 1
0
        private GameSession PrepareGameSession()
        {
            GameSession gameSession = new GameSession();
            Player north = new Player(Guid.NewGuid(), "North");
            Player south = new Player(Guid.NewGuid(), "South");
            Player east = new Player(Guid.NewGuid(), "East");
            Player west = new Player(Guid.NewGuid(), "West");
            gameSession.Join(north, PlayerPosition.North);
            gameSession.Join(south, PlayerPosition.South);
            gameSession.Join(east, PlayerPosition.East);
            gameSession.Join(west, PlayerPosition.West);

            //--1st bid: East 1 Diamonds
            gameSession.PlaceBid(Bid.CreateBid(gameSession.GetPlayer(PlayerPosition.East),1, Suit.Diamonds));
            //--2nd bid: North Pass
            gameSession.PlaceBid(Bid.CreatePassBid(gameSession.GetPlayer(PlayerPosition.North)));
            //--3rd bid: West Pass
            gameSession.PlaceBid(Bid.CreatePassBid(gameSession.GetPlayer(PlayerPosition.West)));
            //--4th bid: South 1 Spades
            gameSession.PlaceBid(Bid.CreateBid(gameSession.GetPlayer(PlayerPosition.South),1, Suit.Spades));
            //--5th bid: East 2 Diamonds
            gameSession.PlaceBid(Bid.CreateBid(gameSession.GetPlayer(PlayerPosition.East),2, Suit.Diamonds));
            //--6th bid: North Pass
            gameSession.PlaceBid(Bid.CreatePassBid(gameSession.GetPlayer(PlayerPosition.North)));
            //--7th bid: West Pass
            gameSession.PlaceBid(Bid.CreatePassBid(gameSession.GetPlayer(PlayerPosition.West)));
            //--8th bid: South 2 Spades
            gameSession.PlaceBid(Bid.CreateBid(gameSession.GetPlayer(PlayerPosition.South),2, Suit.Spades));
            //--9th bid: East Pass
            gameSession.PlaceBid(Bid.CreatePassBid(gameSession.GetPlayer(PlayerPosition.East)));
            //--10th bid: North Pass
            gameSession.PlaceBid(Bid.CreatePassBid(gameSession.GetPlayer(PlayerPosition.North)));
            //--11th bid: West Pass
            gameSession.PlaceBid(Bid.CreatePassBid(gameSession.GetPlayer(PlayerPosition.West)));
            //--Auction Closed =>NS - 2 Spades

            return gameSession;
        }
Esempio n. 2
0
        private GameSession PrepareGameSession()
        {
            GameSession gameSession = new GameSession();
            Player north = new Player(Guid.NewGuid(), "North");
            Player south = new Player(Guid.NewGuid(), "South");
            Player east = new Player(Guid.NewGuid(), "East");
            Player west = new Player(Guid.NewGuid(), "West");
            gameSession.Join(north, PlayerPosition.North);
            gameSession.Join(south, PlayerPosition.South);
            gameSession.Join(east, PlayerPosition.East);
            gameSession.Join(west, PlayerPosition.West);

            return gameSession;
        }