コード例 #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="_game"></param>
        /// <param name="_player"></param>
        public FormBank(Game _game, Player _player)
        {
            this.game = _game;
            this.player = _player;

            InitializeComponent();
        }
コード例 #2
0
        public FormSchool(Player player)
        {
            this.player = player;

            InitializeComponent();
            InitializeContent();
        }
コード例 #3
0
        public FormChooseItem(Player player)
        {
            this.player = player;

            InitializeComponent();
            InitializeFormContent();
        }
コード例 #4
0
        public FormThief(Game game, Player player)
        {
            this._game = game;
            this._player = player;

            InitializeComponent();
            InitializeFormContent();
        }
コード例 #5
0
        public FormPlay(Player player, Game game)
        {
            this.player = player;
            this.game = game;

            InitializeComponent();
            InitializeFormContent();
        }
コード例 #6
0
        public FormGame(Game game, Player player)
        {
            this.game = game;
            this.player = player;

            InitializeComponent();
            InitializeContent();
        }
コード例 #7
0
        public FormMission(Mission mission, Player player, Game game)
        {
            this.mission = mission;
            this.player = player;
            this.game = game;
            this.roundLeft = game.GetRandomNumber(this.mission.MinRounds, this.mission.MaxRounds);

            InitializeComponent();
            InitializeFormContent();
        }
コード例 #8
0
        private void InitializeContent(Game game, Player player)
        {
            foreach (Player currentPlayer in game.Players)
            {
                if (player != null && currentPlayer.Name == player.Name)
                    continue; // A player A cannot select himself!

                this.listBoxPlayers.Items.Add(currentPlayer);
            }
        }
コード例 #9
0
        private void AddPlayerItem(Player player)
        {
            ListViewItem item = new ListViewItem(player.Name);
            item.Tag = player;

            item.SubItems.Add(player.Experiences.Creativity.ToString());
            item.SubItems.Add(player.Experiences.Empathy.ToString());
            item.SubItems.Add(player.Experiences.ManagerialSkills.ToString());
            item.SubItems.Add(player.Experiences.PhysicalFitness.ToString());
            item.SubItems.Add(player.Experiences.Scientific.ToString());

            this.listViewPlayers.Items.Add(item);
        }
コード例 #10
0
 public FormPlayerEdition(Player player)
 {
     InitializeComponent();
     this.player = player;
     InitializeFormContent();
 }
コード例 #11
0
 public FormPlayerEdition()
 {
     InitializeComponent();
     this.player = new Player();
     InitializeFormContent();
 }
コード例 #12
0
        private void CreateDefaultPlayers()
        {
            try
            {
                this.game = new Game();
                Player player = new Player()
                {
                    Name = "Damien",
                    Capital = this.game.PlayerData.DefaultCapital
                };
            #if DEBUG
                player.Experiences.Empathy = 350;
                player.Experiences.Creativity = 500;
                player.Experiences.PhysicalFitness = 150;
                player.Experiences.Scientific = 640;
                player.Experiences.ManagerialSkills = 490;
            #else
                player.Experiences.Empathy = 10;
                player.Experiences.Creativity = 2;
                player.Experiences.PhysicalFitness = 20;
                player.Experiences.Scientific = 6;
                player.Experiences.ManagerialSkills = 2;
            #endif

                this.game.Players.Add(player);

                player = new Player()
                {
                    Name = "Léa",
                    Capital = this.game.PlayerData.DefaultCapital
                };
                player.Experiences.Empathy = 2;
                player.Experiences.Creativity = 10;
                player.Experiences.PhysicalFitness = 20;
                player.Experiences.Scientific = 6;
                player.Experiences.ManagerialSkills = 2;

                this.game.Players.Add(player);

                player = new Player()
                {
                    Name = "Frédéric",
                    Capital = this.game.PlayerData.DefaultCapital
                };
                player.Experiences.Empathy = 2;
                player.Experiences.Creativity = 10;
                player.Experiences.PhysicalFitness = 20;
                player.Experiences.Scientific = 6;
                player.Experiences.ManagerialSkills = 2;

                this.game.Players.Add(player);
            }
            catch (Exception exp)
            {
                LPMessageBox.ShowError("Erreur pendant la creation des joueurs !", exp);
            }
        }
コード例 #13
0
 public FormChoosePlayer(Game game, Player player)
 {
     InitializeComponent();
     InitializeContent(game, player);
 }