Ejemplo n.º 1
0
def declare_the_winners():
    """May differs for Cheet"""
    for seat in [1, 2, 3, 4, 5]:
        if pm.my_seat_won_pixel(config.game_position, seat) == True:
            shout("I won the game!", color='on_light_magenta')
        if pm.other_seat_won_pixel(config.game_position, seat) == True:
            shout("Seat %s won the game!" % seat)
Ejemplo n.º 2
0
def declare_the_winners():
    """May differs for Cheet"""
    for seat in range(1, c.TOTAL_SEATS+1):
        if pm.my_seat_won_pixel(c.game_position, seat) == True:
            shout("I won the game!", color = 'on_light_magenta')
        if pm.other_seat_won_pixel(c.game_position, seat) == True :
            shout("Seat %s won the game!" %seat)
Ejemplo n.º 3
0
def declare_the_winners():
    global game_position
    load_variables()

    for seat in [1,2,3,4,5]:
        if pm.my_seat_won_pixel(game_position, seat) == True:
            shout("I won the game!", color = 'on_light_magenta')
        if pm.other_seat_won_pixel(game_position, seat) == True :
            shout("Seat %s won the game!" %seat)
Ejemplo n.º 4
0
def hand_is_ended():
    """
    This is an important function, because it determines
    when new hand will start.
    For cheet: 
    1.Yellow around winning cards 
    2.If everyone fold the somebodies raise, only one player have cards.
    """
    for seat in [1, 2, 3, 4, 5]:
        if pm.my_seat_won_pixel(config.game_position, seat):
            return True
        if pm.other_seat_won_pixel(config.game_position, seat):
            return True
    return False
Ejemplo n.º 5
0
def ocr_my_name():
    """
    If ocr fails this function will uses:
    (will use nothing)
    Will not uses:
    1. fix_game_disruption()
    2. set_just_do_check_fold_to_true()
    """
    if pm.my_seat_won_pixel(config.game_position, config.my_seat_number):
        return True
    if pm.notification_banner_pixel(config.game_position,
                                    config.my_seat_number):
        return None
    string = ocr.ocr_my_name_to_string(config.game_position,
                                       config.my_seat_number)
    shout("my name ocr string at seat %s is: %s" %
          (config.my_seat_number, string))
    return string
def test_pixel_matching():

    # This list may differ for other websites
    ALL_CLICK_NAMES = [
        'fold',
        'check',
        'call',
        'bet',
        'raise',
        'plus',
        'minus',
        'all_in',
        #'available_seat_1', 'available_seat_2', 'available_seat_3',
        #'available_seat_4', 'available_seat_5',
        'exit',
        'exit_yes',
        'menu',
        'rebuy_menu',
        'leave_next_hand_ok',
        'buy_in',
        'buy_in_plus',
        'buy_in_minus',
        're_buy',
        're_buy_plus',
        're_buy_minus',
        'i_am_back',
        #'exit_probable_advertisement', 'close_update_window',
    ]

    print('\n***testing pixel matching for buttons:***')

    for button_name in ALL_CLICK_NAMES:
        print('%s button pixel is: %s' %
              (button_name, pm.button_pixel(game_position, button_name)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('available_seat_%s button pixel is: %s' %
              (seat, pm.available_seat_pixel(game_position, seat)))

    print('\n***testing pixel matching for non buttons:***')

    print('pre_flop_pixel is: %s' % pm.pre_flop_pixel(game_position))
    print('flop_pixel is: %s' % pm.flop_pixel(game_position))
    print('turn_pixel is: %s' % pm.turn_pixel(game_position))
    print('river_pixel is: %s' % pm.river_pixel(game_position))
    for seat in range(1, TOTAL_SEATS + 1):
        print('small_blind_pixel at seat %s is: %s' %
              (seat, pm.small_blind_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('big_blind_pixel at seat %s is: %s' %
              (seat, pm.big_blind_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('dealer_pixel at seat %s is: %s' %
              (seat, pm.dealer_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('player_chips_pixel at seat %s is: %s' %
              (seat, pm.player_chips_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('player_cards_pixel at seat %s is: %s' %
              (seat, pm.player_cards_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('other_player_seated_pixel at seat %s is: %s' %
              (seat, pm.other_player_seated_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('i_am_seated_pixel at seat %s is: %s' %
              (seat, pm.i_am_seated_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('active_player_pixel at seat %s is: %s' %
              (seat, pm.active_player_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('my_seat_won_pixel at seat %s is: %s' %
              (seat, pm.my_seat_won_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('other_seat_won_pixel at seat %s is: %s' %
              (seat, pm.other_seat_won_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('notification_banner_pixel at seat %s is: %s' %
              (seat, pm.notification_banner_pixel(game_position, seat)))
    for seat in range(1, TOTAL_SEATS + 1):
        print('are_chips_white_or_red_pixel at seat %s is: %s' %
              (seat, pm.are_chips_white_or_red_pixel(game_position, seat)))
Ejemplo n.º 7
0
    game_position = find_game_position.find_game_reference_point()


while True :

    preflop_stage = False ; flop_stage = False ; turn_stage = False ; river_stage = False 
""
    if waiting_for_first_hand == True :

        shout("****** Running waiting_for_first_hand == True Section ******"
              , color = 'on_green')
        reset_just_do_check_fold_to_false() #

        reset_table_information() #

        if pm.my_seat_won_pixel(game_position,  my_seat_number ) == False :
            My_Bank = ocr_my_bank(game_position, my_seat_number )
            if My_Bank != None :
                if My_Bank >= 15 * BLIND_VALUE :
                    shout("My Bank is:%s" %My_Bank, color = 'light_green')
                elif My_Bank != 0 :
                    shout("My Bank is:%s" %My_Bank, color = 'light_green')
                    shout("Rebuying...")
                    pass # Later i'll build
        else :
            shout("My Bank can't be read")
            My_Bank = None
        
        Hand_End_Cheker1 = hand_is_ended()
        while Hand_End_Cheker1 :
            Hand_End_Cheker1 = hand_is_ended()