示例#1
0
 public KozelGame()
 {
     players = new ObservableCollection<Player>() { new Player(new StupidAI()), new Player(new StupidAI()), new Player(), new Player(new StupidAI()) };
     team1 = new Team(players[0], players[2]);
     team2 = new Team(players[1], players[3]);
     foreach (Player player in players) {
         player.PlayerMadeMove += Player_PlayerMadeMove;
         player.CardsResorted += Player_CardsResorted;
     }
 }
示例#2
0
文件: Sorting.cs 项目: obstrel/Kozel
        public void CanThrowCard()
        {
            Player p1 = new Player();
            Player p2 = new Player();
            Player p3 = new Player();
            Player p4 = new Player();
            Team team1 = new Team(p1, p3);
            Team team2 = new Team(p2, p4);
            Round round = new Round(new ObservableCollection<Player>() { p1, p2, p3, p4 });
            Kozel.Card card1 = new Kozel.Card(Kozel.CardSuit.Club, Kozel.CardValue.Eight);
            Kozel.Card card2 = new Kozel.Card(Kozel.CardSuit.Club, Kozel.CardValue.Ten);
            Kozel.Card card3 = new Kozel.Card(Kozel.CardSuit.Club, Kozel.CardValue.Ace);
            Kozel.Card card4 = new Kozel.Card(Kozel.CardSuit.Club, Kozel.CardValue.Six);

            p1.AddCard(card1);
            p2.AddCard(card2);
            p3.AddCard(card3);
            p4.AddCard(card4);
            round.Trick.AddMove(card1, p1);
            round.Trick.AddMove(card2, p2);
            round.Trick.AddMove(card3, p3);
            // round.Trick.AddMove(card4, p4);
            Assert.IsTrue(round.CanThrowCard(p4, card1));
        }
示例#3
0
 public RoundFinishedEventArgs(Player lastRoundWinner, Team roundOwner)
 {
     LastRoundWinner = lastRoundWinner;
     RoundOwner = roundOwner;
 }