Bunco Simulator

Diff

Differences From Artifact [bdb21a]:

To Artifact [f4b738]:


210
211
212
213
214
215
216















217
218
219
220
221
222
223
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







    
    def prep_new_round(self):
        self.team1_score = 0
        self.team2_score = 0
        self.active_player = -1
        for player in self.players:
            player.prep_new_round()
    
    def get_player_situation(self, player):
        player_index = self.players.index(player)
        if player_index % 2 == 0:
            opponents = self.players[1::2]
            opponent_score = self.team2_score
        else:
            opponents = self.players[0::2]
            opponent_score = self.team1_score
        teammate = self.players[teammate_lookup[player_index]]

        return {'teammate': teammate, 
                'opponents': opponents,
                'opponent_score': opponent_score}


def assign_teams(player_list):
    players_per_table = 4
    tables = []
    random.seed()

    if len(player_list) % players_per_table != 0: