import control_revise_4 as pages from . import * c = cu class PlayerBot(Bot): def play_round(self): if self.round_number == 1: yield Introduction for i in range(len(Constants.index_vote_round)): prev_self1 = self.player.in_round(self.round_number - 1) if prev_self1.subsession.num_death_all!=4: if self.round_number ==Constants.index_vote_round[i]: if self.round_number in Constants.index_second_and_third_vote_round: prev_self = self.player.in_round(self.round_number - 1) if prev_self.is_died==False: yield Vote, dict(img_choice='X',start_timestamp=0,end_timestamp=1) else: #yield Vote, dict(vote=0) if self.group.id_in_subsession==1: yield Vote, dict(img_choice='X',start_timestamp=0,end_timestamp=1) else: yield Vote, dict(img_choice='X',start_timestamp=0,end_timestamp=1) for i in range(len(Constants.index_vote_round)): prev_self1 = self.player.in_round(self.round_number - 1) if prev_self1.subsession.num_death_all!=4: if self.round_number ==Constants.index_vote_round[i]: if self.round_number in Constants.index_second_and_third_vote_round: prev_self = self.player.in_round(self.round_number - 1) if prev_self.is_died==False: yield VoteResult else: yield VoteResult for i in range(len(Constants.index_game_round)): if self.round_number == Constants.index_game_round[i]: if self.subsession.num_death_all!=4: yield Submission(pages.NumberTable4,check_html=False) # yield NumberTable4 for i in range(len(Constants.index_game_round)): if self.round_number == Constants.index_game_round[i]: if self.subsession.num_death_all!=4: # yield Game2, dict(game_cell1_input=1, game_cell2_input=2, game_cell3_input=3, game_cell4_input=4, game_cell5_input=5, game_cell6_input=6, game_cell7_input=7, game_cell8_input=8, game_cell9_input=9, game_cell10_input=10, game_cell11_input=11,game_cell12_input=12, game_cell13_input=13, game_cell14_input=14,game_cell15_input=15, game_cell16_input=16) yield Submission(pages.Game2, dict(game_cell1_input=1, game_cell2_input=2, game_cell3_input=3, game_cell4_input=4, game_cell5_input=5, game_cell6_input=6, game_cell7_input=7, game_cell8_input=8, game_cell9_input=9, game_cell10_input=10, game_cell11_input=11,game_cell12_input=12, game_cell13_input=13, game_cell14_input=14,game_cell15_input=15, game_cell16_input=16)) for i in range(len(Constants.index_game_round)): if self.round_number == Constants.index_game_round[i]: if self.subsession.num_death_all!=4: yield GameResult for i in range(len(Constants.index_fifth_game_round)): if self.round_number ==Constants.index_fifth_game_round[i]: if self.player.is_all_died_last_time==False: yield OtherGroupResult for i in range(len(Constants.index_final_round)): if self.round_number ==Constants.index_final_round[i]: if self.player.is_all_died_last_time==False: yield Final #if self.round_number == Constants.num_rounds: #yield Submission(pages.bye,check_html=False)