YatzyPy/main.py
def autoGame(self, r=15):
        """ Run 15 draws so that every category has been used """
        n = 0
        while n < r:
            # second round with hold suggestion
            suggested_hold = self.autoHold()
            if len(suggested_hold) < 5:
                self.hold(suggested_hold)
                # third round with hold suggestion
                suggested_hold = self.autoHold()
                if len(suggested_hold) < 5:
                    self.hold(suggested_hold)
            # suggest the category for the hand
            suggested_select = self.autoSelect()
            if suggested_select is not None:
                self.select(suggested_select)
            # make next draw
            self.draw()
            # mark iteration
            n += 1
 Run 15 draws so that every category has been used 
Run 15 draws so that every category has been used
Run 15 draws so that every category has been used
def autoGame(self, r=15):
        n = 0
        while n < r:
            suggested_hold = self.autoHold()
            if len(suggested_hold) < 5:
                self.hold(suggested_hold)
                suggested_hold = self.autoHold()
                if len(suggested_hold) < 5:
                    self.hold(suggested_hold)
            suggested_select = self.autoSelect()
            if suggested_select is not None:
                self.select(suggested_select)
            self.draw()
            n += 1
def autoGame ( self , r = 15 ) : n = 0 while n < r : suggested_hold = self . autoHold ( ) if len ( suggested_hold ) < 5 : self . hold ( suggested_hold ) suggested_hold = self . autoHold ( ) if len ( suggested_hold ) < 5 : self . hold ( suggested_hold ) suggested_select = self . autoSelect ( ) if suggested_select is not None : self . select ( suggested_select ) self . draw ( ) n += 1
Run 15 draws so that every category has been used
Run 15 draws so that every category has been used
""" Run 15 draws so that every category has been used """ # second round with hold suggestion # third round with hold suggestion # suggest the category for the hand # make next draw # mark iteration
self
r