Example #1
0
        public void Deal()
        {
            if (PlayerOneHand.Count < 4 || PlayerTwoHand.Count < 4)
            {
                if (PlayerOneHand.Count < PlayerTwoHand.Count)
                {
                    //Player 1 wins
                }
                else if (PlayerTwoHand.Count < PlayerOneHand.Count)
                {
                    //Player 2 wins
                }
                else
                {
                    //Add points logic
                }
            }

            //Set the position for the top four cards of player one to the gameboard
            for (int i = 0; i < 4; i++)
            {
                PlayerOneHand[i].Position = i + 1;

                //Add to cards in game list
                CardsInGame.Add(PlayerOneHand[i]);

                //Remove from hand list
                PlayerOneHand.RemoveAt(i);
            }

            //Set the position for the top four cards of player two to the gameboard
            for (int i = 4; i < 8; i++)
            {
                PlayerTwoHand[i].Position = i + 1;

                //Add to cards in game list
                CardsInGame.Add(PlayerTwoHand[i]);

                //Remove from hand list
                PlayerTwoHand.RemoveAt(i);
            }
        }
Example #2
0
        //the html that displays the clan card used in the pop down menu's and header of searched clan
        public override string ToString()
        {
            string returnString = "<div class=\"card card-group\"> <div class=\"container-fluid d-inline-flex\"> <div class=\"col-2\"> <p><b>Name:</b>" + Name + "</p> <p><b>Tag:</b>" + Tag + "</p> <p><b>Level:</b>" + ExpLevel.ToString() + "</p>";

            if (ExpLevel == 13)
            {
                returnString += "<p><b>Star Points:</b>" + StarPoints.ToString() + "</p>";
            }

            returnString += "<p><b>Current Tropies:</b>" + Trophies.ToString() + "</p><p><b>Highest Trophies:</b>" + BestTrophies + "</p></div>";

            returnString += "<div class=\"col-2\"><p><b>All Time Wins:</b>" + Wins.ToString() + "</p><p><b>All Time Losses:</b>" + Losses.ToString() + "</p>";
            Console.WriteLine();
            returnString += "<p><b>Current Favorite Card:</b>" + CurrentFavouriteCard.Name + "</p><img class=\"text-center\" src=\"" + CurrentFavouriteCard.Url + "\" width=\"64px\" />";
            returnString += "<p><b>Cards Discovered:</b>" + CardsDiscovered.ToString() + "/" + CardsInGame.ToString() + "</p></div>";

            returnString += "<div class=\"col-3\">";
            if (Clan != null)
            {
                returnString += "<p><b>Clan Name:</b>" + Clan.Name + "</p>";
            }
            if (Clan != null)
            {
                returnString += "<p><b>Clan Tag:</b>" + ClanTag + "</p>";
            }
            else
            {
                returnString += "<h2 class=\"text-center m-2\">Not In a Clan</h2>";
            }

            returnString += "<p><b>Recent Donations:</b>" + Donations.ToString() + "</p><p><b>Recent Donations Recieved:</b>" + DonationsReceived.ToString() + "</p>";
            returnString += "<p><b>Total Donations:</b>" + TotalDonations.ToString() + "</p><p><b>Total Donations Recieved:</b>" + ClanCardsCollected.ToString() + "</p></div>";


            returnString += "<div class=\"col-5 m-0\"><div class=\"text-center\"><p><b>Current Deck</b></p> " + Deck.ToString() + "<p>Profile Updated:" + UpdateTime + "</p></div></div></div></div>";

            return(returnString);
        }