예제 #1
0
파일: KozelGame.cs 프로젝트: obstrel/Kozel
 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;
 }