コード例 #1
0
def test_checkJapanRon_qingyise():
    #[一筒,二筒,三筒,三筒,五筒,六筒,六筒,六筒,七筒,七筒,九筒,九筒,九筒]
    hand = [(p, 0) for p in parsedPai("1233566677999m")]
    t.setHand(hand)
    ron = t.checkRon((parsedPai("4m")[0], 0))
    print(ron)
    assert ron[1].judgeRon == " 清一色"
コード例 #2
0
def test_checkJapanRon_sianke():
    hand = [(p, 0) for p in parsedPai("222444m333555s2p")]
    t.setHand(hand)
    ron = t.checkRon((parsedPai("2p")[0], 0))[1]
    assert ron.judgeRon == " 四暗刻"
    assert ron.zj == 32000
    assert ron.dj == 16000
    assert ron.xj == 8000
コード例 #3
0
def test_checkJapanRon_sananke():
    hand = [(p, 0) for p in parsedPai("66m34777pbbb222z")]
    t.setHand(hand)
    t.ifzhuang = False
    ron = t.checkRon((parsedPai("2p")[0], 0))[1]
    assert ron.judgeRon == " 三暗刻 自风 役牌 白"
コード例 #4
0
def test_checkJapanRon_duanyao():
    hand = [(p, 0) for p in parsedPai("233445m678s2p")]
    t.setHand(hand)
    t.openHand["chi"].append([(p, 0) for p in parsedPai("678s")])
    ron = t.checkRon((parsedPai("2p")[0], 0))[1]
    assert ron.judgeRon == " 断幺九"
コード例 #5
0
def test_checkJapanRon_yiqiguantong():
    hand = [(p, 0) for p in parsedPai("23456789m11sccc")]
    t.setHand(hand)
    ron = t.checkRon((parsedPai("1m")[0], 0))[1]
    print(ron.judgeRon)
    assert ron.judgeRon == " 一气贯通 役牌 中"
コード例 #6
0
def test_checkWait_tenpai():
    hand = [(p, 0) for p in parsedPai("112233556677s1z")]
    t.setHand(hand)
    assert t.checkWait() == [parsedPai("1z")]
コード例 #7
0
def test_checkWait_Shanpon():
    hand = [(pai, 0) for pai in parsedPai("456789m123s1122z")]
    t.setHand(hand)
    assert t.checkWait() == [parsedPai("12z")]
コード例 #8
0
def test_checkWait_Penchan():
    hand = [(pai, 0) for pai in parsedPai("45689m112233s22z")]
    t.setHand(hand)
    assert t.checkWait() == [[6]]
コード例 #9
0
def test_checkWait_Ryanmen():
    hand = [(pai, 0) for pai in parsedPai("23m112233s11122z")]
    t.setHand(hand)
    assert t.checkWait() == [[0, 3]]