/// <summary> /// /// </summary> /// <param name="_game"></param> /// <param name="_player"></param> public FormBank(Game _game, Player _player) { this.game = _game; this.player = _player; InitializeComponent(); }
public FormThief(Game game, Player player) { this._game = game; this._player = player; InitializeComponent(); InitializeFormContent(); }
public FormPlay(Player player, Game game) { this.player = player; this.game = game; InitializeComponent(); InitializeFormContent(); }
public FormGame(Game game, Player player) { this.game = game; this.player = player; InitializeComponent(); InitializeContent(); }
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); } }
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); } }
public void Sleep(Game game) { if (game.JobData != null) this.workingRoundLeft = game.JobData.MaxWorkingRound; }
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; }
public FormChoosePlayer(Game game, Player player) { InitializeComponent(); InitializeContent(game, player); }
public void InitializeGame(Game game) { this.currentGame = game; }