public StartupPlayerView()
        {
            InitializeComponent();

            // Create a new player object
            player = new Player();

            // Select human by default
            type.SelectedIndex = 0;

            // Set the background image
            BackgroundImage = Properties.Resources.CardTableLight;
        }
Exemple #2
0
 public bool DealCard(Player player)
 {
     if (CurrentDeck.Count == 0)
     {
         DeckIsEmpty();
         return false;
     }
     player.ReceiveCard(CurrentDeck[0]);
     Console.Write("\rPlayer "+player.Name+" received a card");
     Thread.Sleep(400);
     CurrentDeck.RemoveAt(0);
     return true;
 }
Exemple #3
0
 /// <summary>
 /// Create a new GamePlayer object
 /// </summary>
 /// <param name="inputPlayer"></param>
 public GamePlayer(Player inputPlayer)
 {
     player = inputPlayer;
 }
        public void SetInfo(Player thePlayer, Game theGame)
        {
            game = theGame;
            player = thePlayer;
            gamePlayer = game.PlayersCards[player] as Game.GamePlayer;

            // Don't show the score label if basic scoring is used
            if (game.Options.ScoringSystem == GameOptions.ScoringSystems.Basic)
                scoreLabel.Visible = false;

            nameLabel.Text = player.Name;
            scoreLabel.Text = "Score: " + player.Score;

            //typeLabel.Text = Player.PlayerTypeToString(player.Type);
            typeBadge.Image = Player.PlayerTypeBadge(player.Type);

            turnsLabel.Text = gamePlayer.NumberOfTurns.ToString();
            cardsPickedUpLabel.Text = gamePlayer.NumberOfCardsPickedUp.ToString();
            cardsPlayedLabel.Text = gamePlayer.NumberOfCardsPlayed.ToString();

            ordinalLabel.Text = GetOrdinalStringForInt(player.Rank + 1);
        }
Exemple #5
0
 public void AddPlayer(Player player)
 {
     _playersInGame.Add(player);
     Console.WriteLine(_playersInGame[_playersInGame.Count-1].Name+" added to the game. Currently "+_playersInGame.Count+" players in the game");
 }