def tick(self):
if self.state == AuctionState.NOMINATE:<EOL><INDENT>if self.nominee is None:<EOL><INDENT>raise InvalidActionError("<STR_LIT>")<EOL><DEDENT>self.state = AuctionState.BID<EOL>self.bids = [self.bid if i == self.turn_index else <NUM_LIT:0> for i in range(len(self.owners))]<EOL>self.tickbids = [<NUM_LIT:0>] * len(self.owners)<EOL><DEDENT>elif self.state == AuctionState.BID:<EOL><INDENT>if not any(bid > <NUM_LIT:0> for bid in self.tickbids):<EOL><INDENT>winner = self._winning_owner()<EOL>winner.buy(self.nominee, self.bid)<EOL>self._player_ownership[self._nominee_index] = self.winning_owner_index()<EOL>self.undrafted_players.remove(self.nominee)<EOL>self.nominee = None<EOL>self._nominee_index = -<NUM_LIT:1><EOL>done = True<EOL>for i in range(len(self.owners)):<EOL><INDENT>next_turn = (self.turn_index + <NUM_LIT:1> + i) % len(self.owners)<EOL>if self.owners[next_turn].remaining_picks() > <NUM_LIT:0>:<EOL><INDENT>self.turn_index = next_turn<EOL>done = False<EOL>break<EOL><DEDENT><DEDENT>if done:<EOL><INDENT>self.state = AuctionState.DONE<EOL><DEDENT>else:<EOL><INDENT>self.state = AuctionState.NOMINATE<EOL><DEDENT><DEDENT>else:<EOL><INDENT>top_idxs = [i for i, bid in enumerate(self.tickbids) if bid == max(self.tickbids)]<EOL>accept_idx = random.choice(top_idxs)<EOL>self.bid = self.tickbids[accept_idx]<EOL>self.bids[accept_idx] = self.bid<EOL>self.tickbids = [<NUM_LIT:0>] * len(self.owners)<EOL><DEDENT><DEDENT>
Advances time in the game. Use this once all "choices" have been submitted for the current
game state using the other methods.