Example #1
0
def score_test():
    players = [player("A"), player("B"), player("C"), player("D")]

    scores = score_tables([x.name for x in players])
    scores.add_score_row([8,3,2,0])
    print(scores)
    scores.add_score_row([7,1,3,2])
    print(scores)
Example #2
0
def select_trump_test():
    players = [player("A"), player("B"), player("C"), player("D")]
    r = round(players)
    d = deck()
    d.shuffle_cards()
    for p, i in zip(players, range(0,4)):
        p.gather_cards(d[i*13:(i+1)*13])
    r.get_bids()
    r.select_trump()
Example #3
0
def first_play():
    p = player("A")
    p2 = player("B")
    d = deck()
    trump = 0
    d.shuffle_cards()
    c = []
    d.update_values(trump)
    p.gather_cards(np.array(d[:4].tolist() + d[8:10].tolist()))
    p2.gather_cards(np.array(d[:4].tolist() + d[8:10].tolist()))
    c.append(p.play(c, trump, False))
    c.append(p2.play(c, trump, False))
Example #4
0
def player_play_test():
    players = [player("A"), player("B"), player("C"), player("D")]
    r = round(players)
    r.shuffle_deck()
    r.deal_cards()
    r.get_bids()
    r.select_trump()
    #burada kaldık
    for p in players:
        for c in p.cards:
            print("Card:{}, value:{}".format(c, c.value))
    t = turn(False)
    t.play_turn(players, r.trump)
Example #5
0
def player_card_play():

    p = player("A")
    d = deck()
    trump = 0
    d.shuffle_cards()
    c = d[4:7]
    print(c[0].suit)
    d.update_values(trump)
    p.gather_cards(np.array(d[:4].tolist() + d[8:10].tolist()))
    print(c)
    p.play(c, 0, True)
Example #6
0
def player_rotate_test():
    players = [player("A"), player("B"), player("C"), player("D")]
    s = spades(players, 10)
    for i in range(0,10):
        print("Rotating")
        s.rotate_players()