예제 #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 FormThief(Game game, Player player)
        {
            this._game = game;
            this._player = player;

            InitializeComponent();
            InitializeFormContent();
        }
예제 #3
0
        public FormPlay(Player player, Game game)
        {
            this.player = player;
            this.game = game;

            InitializeComponent();
            InitializeFormContent();
        }
예제 #4
0
        public FormGame(Game game, Player player)
        {
            this.game = game;
            this.player = player;

            InitializeComponent();
            InitializeContent();
        }
예제 #5
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();
        }
        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);
            }
        }
예제 #7
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);
            }
        }
예제 #8
0
 public void Sleep(Game game)
 {
     if (game.JobData != null)
         this.workingRoundLeft = game.JobData.MaxWorkingRound;
 }
예제 #9
0
 public bool Play(Form parentForm, Game game)
 {
     this.game = game;
     using (FormPlay play = new FormPlay(this, game))
     {
         if (play.ShowDialog(parentForm) != DialogResult.OK)
             return false;
     }
     return true;
 }
예제 #10
0
 public FormChoosePlayer(Game game, Player player)
 {
     InitializeComponent();
     InitializeContent(game, player);
 }
예제 #11
0
 public void InitializeGame(Game game)
 {
     this.currentGame = game;
 }