add somethin to myrummy and fix SJNfilemanager
This commit is contained in:
+1
-8
@@ -202,7 +202,6 @@ class Game:
|
||||
|
||||
def bot_turn(self):
|
||||
p=self.p
|
||||
print(f'\n {p.name} ist am Zug:')
|
||||
melded=[]
|
||||
while True:
|
||||
m=self.find_meld(p.hand)
|
||||
@@ -213,8 +212,6 @@ class Game:
|
||||
if melded and (p.opened or not self.min30 or total>=30):
|
||||
for m in melded: self.table.append(m)
|
||||
if not p.opened: p.opened=True
|
||||
for m in melded:
|
||||
print(' legt: '+' '.join(c.plain() for c in m))
|
||||
if not p.hand:
|
||||
print(f'\n {p.name} gewinnt!')
|
||||
return True
|
||||
@@ -223,13 +220,9 @@ class Game:
|
||||
for c in m: p.hand.append(c)
|
||||
p.hand=sort_hand(p.hand)
|
||||
if self.deck:
|
||||
card=self.deck.pop(); p.hand.append(card); p.hand=sort_hand(p.hand)
|
||||
print(f' kann nicht legen und zieht {card.plain()}.')
|
||||
else:
|
||||
print(' Stapel leer - Zug wird beendet.')
|
||||
p.hand.append(self.deck.pop()); p.hand=sort_hand(p.hand)
|
||||
self.turn=(self.turn+1)%len(self.players); self.drew=False; self.melded=False; self.history=[]
|
||||
self.handover=True
|
||||
input('\n ENTER...')
|
||||
return False
|
||||
|
||||
def run(self):
|
||||
|
||||
Reference in New Issue
Block a user