public void Undo(GamerMan gam, GameField fil, ref bool flagC) { if (gam.statusGamer == StatusGamer.Hod) { foreach (var key in cancelKardIndex) { fil.DelkardHod(key); } gam.DelAllKard(); gam.AddKard(cancelPlayerKard.GetKard()); cancelPlayerKard = null; cancelKardIndex.Clear(); flagC = true; } else if (gam.statusGamer == StatusGamer.Otbit) { foreach (var key in cancelKardIndex) { fil.DelkardBoy(key); } gam.DelAllKard(); gam.AddKard(cancelPlayerKard.GetKard()); cancelPlayerKard = null; cancelKardIndex.Clear(); flagC = true; } }
public void AddCancelPlayerKard(GamerMan gam, ref bool flagC) { cancelPlayerKard = new GamerMan(); for (int i = 0; i < gam.GetKard().Count; i++) { cancelPlayerKard.AddKard(gam.GetKardIndex(i)); } flagC = false; }