public Workshop(Player Player) { player = Player; Click += new EventHandler(MoveField); Click += new EventHandler(DoAction); Type["action"] = true; Hand = player.GetShowHand(); cost = 3; action = 1; clicked = false; }
public void MoveField(object sender, EventArgs e) { if (!player.GetShowField().Contains(this) && player.GetTurn()) { if (Type["action"]) { if (player.GetAction() != 0) { player.GetShowField().Add(this); player.GetShowHand().Remove(this); ChangePointPara(180 + 20 * (player.GetShowField().Count - 1), 370); player.getHand().Remove(this.Name); player.GetField().Add(this.Name); Sort(); player.LabeUpdate(); } } else { player.GetShowField().Add(this); player.GetShowHand().Remove(this); ChangePointPara(180 + 20 * (player.GetShowField().Count - 1), 370); player.getHand().Remove(this.Name); player.GetField().Add(this.Name); Sort(); player.LabeUpdate(); } } this.Enabled = false; }
public PlayCard(Player p) { init(); player = p; Hand = p.GetShowHand(); }