public Game(Player user_, Player comp_, InputName input_, Log log_, PlayerForm playerform_, PlayerForm computer) { compform.head.Enabled = false; compform.body.Enabled = false; compform.legs.Enabled = false; user.Block += playerBlock; user.Wound += playerWound; user.Death += Death; user = user_; comp = comp_; log = log_; input = input_; playerform = playerform_; compform = computer; input.NameIsOK += NameSubmitClick; playerform.AtackHeadClick += AtackHeadClick; playerform.AtackBodyClick += AtackBodyClick; playerform.AtackLegsClick += AtackLegsClick; playerform.BlockHeadClick += BlockHeadClick; playerform.BlockBodyClick += BlockBodyClick; playerform.BlockLegsClick += BlockLegsClick; playerform.SetFirstPlayer += SetFirstPlayer; comp.Block += ComputerBlock; comp.Wound += ComputerWound; comp.Death += Death; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); InputName nameInput = new InputName(); PlayerForm user = new PlayerForm(); PlayerForm comp = new PlayerForm(); Log log = new Log(); // Model Player computer = new Player("computer"); Player player = new Player("player"); // Presenter Game new_gme = new Game(player, computer, nameInput, log, user, comp); Application.Run(nameInput); }