public void SpecialSummonMonster(Monster monster, bool faceUp, bool atkPosition) { var zIndex = MonsterZones.ToList().FindIndex(z => z.Monster == null); MonsterZones[zIndex].Monster = monster; monster.Location = CardLocation.MonsterZone; if (faceUp) { if (atkPosition) { monster.Position = CardPosition.FaceUpAttack; } else { monster.Position = CardPosition.FaceUpDefense; } } else { if (atkPosition) { monster.Position = CardPosition.FaceDownAttack; } else { monster.Position = CardPosition.FaceDownDefense; } } }
public void SendMonsterToGrave(Monster monster, YugiohGamePlayer player) { var index = MonsterZones.ToList().FindIndex(z => z.Monster == monster); MonsterZones[index] = new MonsterZone(); player.DiscardPile.Add(monster); monster.Location = CardLocation.Graveyard; }
public void NormalSet(Monster monster) { if (HasFreeMonsterZone() == false) { throw new Exception("No free zones to set to"); } var freeZone = MonsterZones.ToList().FindIndex(z => z.Monster == null); MonsterZones[freeZone].Monster = monster; monster.Location = CardLocation.MonsterZone; monster.Position = CardPosition.FaceDownDefense; }