Guest User

Untitled

a guest
Jul 17th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. p = get_ids();
  2. thePreds = predators(board(board > 0));
  3. scores = zeros(1, length(thePreds));
  4. for x = 1:length(thePreds)
  5. p = thePreds(x);
  6. scores(x) = p.score;
  7. end
  8. highScore = max(scores);
  9. theIndex = 0;
  10. for y = 1:length(thePreds)
  11. p = thePreds(y);
  12. if(p.score == highScore)
  13. preds(1, theIndex) = thePreds(y);
  14. theIndex = theIndex + 1;
  15. end
  16. end
Add Comment
Please, Sign In to add comment