Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = get_ids();
- thePreds = predators(board(board > 0));
- scores = zeros(1, length(thePreds));
- for x = 1:length(thePreds)
- p = thePreds(x);
- scores(x) = p.score;
- end
- highScore = max(scores);
- theIndex = 0;
- for y = 1:length(thePreds)
- p = thePreds(y);
- if(p.score == highScore)
- preds(1, theIndex) = thePreds(y);
- theIndex = theIndex + 1;
- end
- end
Add Comment
Please, Sign In to add comment