How to make a drafting mechanism?

How can I make the computer generated teams choose a player that it needs (field position) and get the best player that it needs?
So lets say in needs a 1st basemen and 3rd Basemen,
So the list says:
1st basemen - Albert Pujols 99 overall
2nd basemen - Dan Uggla 92 overall
3rd basemen - Edwin Encarnation 86 overall
1st basemen - Ryan Howard 95 overall
(The above are real mlb examples) How will I get it to automatically choose the best overall player that it needs? So in this case that would be Albert Pujols. And then for its next pick, choose only the position it needs (3rd base) so Edwin? How can I do this?
Also, is there a way to remove the names of the players taken and move all of the rest of the players below it up a space? - If not, I will change the alpha and make it inselectable (if thats a word)
Thanks
So lets say in needs a 1st basemen and 3rd Basemen,
So the list says:
1st basemen - Albert Pujols 99 overall
2nd basemen - Dan Uggla 92 overall
3rd basemen - Edwin Encarnation 86 overall
1st basemen - Ryan Howard 95 overall
(The above are real mlb examples) How will I get it to automatically choose the best overall player that it needs? So in this case that would be Albert Pujols. And then for its next pick, choose only the position it needs (3rd base) so Edwin? How can I do this?
Also, is there a way to remove the names of the players taken and move all of the rest of the players below it up a space? - If not, I will change the alpha and make it inselectable (if thats a word)
Thanks
Comments
1stbasemen
2ndbasemen
3rdbasemen
have 0 for its off state and 1 for its on state
also have a global attribute for the players
Albert Pujols
Ryan Howard
same as above have 0 for its offstate and 1 for its on state
have another 2 global integer attributes for
AlbertpujolsOverall
RyanhowardOverall
in both of those players put self attributes for *overall*
rule if 1basemen = 0 (this will tell gs to see if a 1st basemen has been chosen or not)
and
Albert Pujols = 0
Ryan Howard = 0
(this will tell gs to check who is available for selecting)
have another rule inside that saying
AlbertpujolsOverall > RyanhowardOverall
then change attribute Albert Pujols to 1
and change attribute 1stbasemen to 1
have another rule saying the opposite
RyanhowardOverall > AlbertpujolsOverall
then change attribute Ryan Howard to 1
and change attribute 1stbasemen to 1
also make sure that the AlbertpujolsOverall and RyanhowardOverall attributes are either costrained to the internal *overall* attributes of the corresponding players or make sure to have it update regularly
so inside the ryanhoward actor you could have
constrain attribute game.ryanhowardoverall to self.overall
think that should work.
if 3rdbasemen = 0
and Edwin Encarnation = 0
change attribute Edwin Encarnation to 1
change attribute 3rdbasemen to 1
also make sure to have another actor (maybe invisible) that blocks the names from actually fully flying off the screen