Advertisement
Ramaraunt1

listcheck c#

Jan 9th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. bool done = true;
  2. list<int> toKill;
  3. for (int x = 0; x < Alive.Count; x ++)
  4. {
  5. bool inDead = false;
  6.  
  7. for (int y = 0; y < Dead.Count; y ++)
  8. {
  9. if (Alive[x] == Dead[y])
  10. {
  11. inDead = true;
  12. }
  13. }
  14. if (inDead == false)
  15. {
  16. done = false;
  17. toKill.Add(y);
  18. }
  19. }
  20.  
  21. for (every element int toKill)
  22. {
  23. Alive.Remove(element);
  24. }
  25. return done;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement