1112 lines
48 KiB
Python
1112 lines
48 KiB
Python
# --- package ---
|
|
import tkinter as tk
|
|
from tkinter import ttk
|
|
import tkinter.messagebox
|
|
|
|
def baccarat_test2():
|
|
def apply_btn_func():
|
|
global enter_user_btn_cnt, apply_pattern1_btn_cnt, pattern1_btn_cnt, pattern2_btn_cnt, pattern3_btn_cnt, pattern4_btn_cnt, step_cnt
|
|
|
|
root1_frm1_cvs1.yview_moveto('1.0')
|
|
|
|
root1_frm1_frm2_btn1.focus_set()
|
|
|
|
amount_var = root1_frm1_frm1_frm1_ety1.get()
|
|
|
|
bet_var = root1_frm1_frm1_frm2_cbb1.get()
|
|
bet_var_split = bet_var.split('원')[0]
|
|
|
|
user_var = root1_variety1.get()
|
|
|
|
if amount_var.isdigit():
|
|
if bet_var_split.isdigit():
|
|
if user_var:
|
|
enter_user_btn_cnt = 0
|
|
apply_pattern1_btn_cnt = 1
|
|
pattern1_btn_cnt = 2
|
|
pattern2_btn_cnt = 1
|
|
pattern3_btn_cnt = 0
|
|
pattern4_btn_cnt = 1
|
|
step_cnt = 1
|
|
|
|
root1_frm1_frm1_frm3_rcb1.configure(state="disable")
|
|
root1_frm1_frm1_frm3_rcb2.configure(state="disable")
|
|
|
|
root1_frm1_frm1_frm4_btn1.configure(state="disable")
|
|
root1_frm1_frm1_frm4_btn2.configure(state="disable")
|
|
root1_frm1_frm1_frm4_btn3.configure(state="disable")
|
|
root1_frm1_frm1_frm4_btn4.configure(state="disable")
|
|
|
|
root1_frm1_frm1_frm5_rcb1.configure(state="disable")
|
|
root1_frm1_frm1_frm5_rcb2.configure(state="disable")
|
|
root1_frm1_frm1_frm5_rcb3.configure(state="disable")
|
|
root1_frm1_frm1_frm5_rcb4.configure(state="disable")
|
|
|
|
root1_frm1_frm4_frm1_lbl5.configure(text="1/14 단계")
|
|
root1_frm1_frm4_frm1_lbl6.configure(text=amount_var)
|
|
root1_frm1_frm4_frm1_lbl7.configure(text=bet_var_split)
|
|
root1_frm1_frm4_frm1_lbl8.configure(text=0)
|
|
|
|
if user_var == user1:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
elif user_var == user2:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
|
|
root1_frm1_frm4_frm1_lbl12.configure(text=bet_var_split)
|
|
|
|
else:
|
|
msg_error('배팅 단위를 선택해주세요')
|
|
|
|
else:
|
|
msg_error('개시 금액에 숫자를 입력해주세요')
|
|
|
|
def enter_player_btn_func():
|
|
global enter_user_btn_cnt
|
|
|
|
if enter_user_btn_cnt < 12:
|
|
labels[enter_user_btn_cnt].configure(fg=tk_blue, text=user1)
|
|
|
|
enter_user_btn_cnt = enter_user_btn_cnt + 1
|
|
|
|
def enter_banker_btn_func():
|
|
global enter_user_btn_cnt
|
|
|
|
if enter_user_btn_cnt < 12:
|
|
labels[enter_user_btn_cnt].configure(fg=tk_red, text=user2)
|
|
|
|
enter_user_btn_cnt = enter_user_btn_cnt + 1
|
|
|
|
def undo_btn_func():
|
|
global enter_user_btn_cnt
|
|
|
|
if enter_user_btn_cnt > 0:
|
|
labels[enter_user_btn_cnt - 1].configure(text='')
|
|
enter_user_btn_cnt -= 1
|
|
|
|
def analysis_pattern_btn_func():
|
|
global enter_user_btn_cnt
|
|
|
|
root1_frm1_frm1_frm4_lbl2.configure(text='')
|
|
|
|
if enter_user_btn_cnt > 5:
|
|
pattern6_var = labels[enter_user_btn_cnt - 1].cget('text')
|
|
pattern5_var = labels[enter_user_btn_cnt - 2].cget('text')
|
|
pattern4_var = labels[enter_user_btn_cnt - 3].cget('text')
|
|
pattern3_var = labels[enter_user_btn_cnt - 4].cget('text')
|
|
pattern2_var = labels[enter_user_btn_cnt - 5].cget('text')
|
|
pattern1_var = labels[enter_user_btn_cnt - 6].cget('text')
|
|
|
|
if all(pattern in (user1, user2) for pattern in (pattern1_var, pattern2_var, pattern3_var, pattern4_var)) and (pattern1_var, pattern2_var, pattern3_var, pattern4_var).count(pattern1_var) == 4:
|
|
root1_frm1_frm1_frm4_lbl2.configure(text=pattern3)
|
|
|
|
elif all(pattern in (user1, user2) for pattern in (pattern1_var, pattern2_var, pattern3_var, pattern4_var, pattern5_var)) and (pattern1_var, pattern2_var, pattern3_var, pattern4_var, pattern5_var).count(pattern1_var) == 5:
|
|
root1_frm1_frm1_frm4_lbl2.configure(text=pattern3)
|
|
|
|
elif all(pattern in (user1, user2) for pattern in (pattern1_var, pattern2_var, pattern3_var, pattern4_var, pattern5_var, pattern6_var)) and (pattern1_var, pattern2_var, pattern3_var, pattern4_var, pattern5_var, pattern6_var).count(pattern1_var) == 6:
|
|
root1_frm1_frm1_frm4_lbl2.configure(text=pattern3)
|
|
|
|
elif all(pattern in (user1, user2) for pattern in (pattern2_var, pattern3_var, pattern4_var, pattern5_var, pattern6_var)) and (pattern2_var, pattern3_var, pattern4_var, pattern5_var, pattern6_var).count(pattern2_var) == 5:
|
|
root1_frm1_frm1_frm4_lbl2.configure(text=pattern3)
|
|
|
|
elif all(pattern in (user1, user2) for pattern in (pattern3_var, pattern4_var)) and (pattern3_var, pattern4_var).count(pattern3_var) == 2 and all(pattern in (user1, user2) for pattern in (pattern5_var, pattern6_var)) and (pattern5_var, pattern6_var).count(pattern5_var) == 2:
|
|
root1_frm1_frm1_frm4_lbl2.configure(text=pattern3)
|
|
|
|
elif all(pattern in (user1, user2) for pattern in (pattern1_var, pattern2_var)) and (pattern1_var, pattern2_var).count(pattern1_var) == 2 and all(pattern in (user1, user2) for pattern in (pattern5_var, pattern6_var)) and (pattern5_var, pattern6_var).count(pattern5_var) == 2:
|
|
root1_frm1_frm1_frm4_lbl2.configure(text=pattern3)
|
|
|
|
else:
|
|
root1_frm1_frm1_frm4_lbl2.configure(text=pattern1)
|
|
|
|
else:
|
|
min_amount_cnt = 6 - enter_user_btn_cnt
|
|
msg_error(f'{min_amount_cnt}번 더 입력해주세요')
|
|
|
|
def player_btn_func():
|
|
global apply_pattern1_btn_cnt, pattern1_btn_cnt, pattern2_btn_cnt, pattern3_btn_cnt, pattern4_btn_cnt, step_cnt
|
|
|
|
if apply_pattern1_btn_cnt == 1:
|
|
root1_frm1_frm3_frm1_btn1.focus_set()
|
|
|
|
if step_cnt < 14:
|
|
# 배팅 금액
|
|
bet_var = root1_frm1_frm1_frm2_cbb1.get()
|
|
bet_var_split = int(bet_var.split('원')[0])
|
|
|
|
# 보유 금액
|
|
amount_var = root1_frm1_frm4_frm1_lbl6.cget('text')
|
|
|
|
# 선수
|
|
user_var = root1_variety1.get()
|
|
|
|
# 패턴
|
|
pattern_var = root1_variety2.get()
|
|
|
|
# 수익금
|
|
profit_var = root1_frm1_frm4_frm1_lbl8.cget('text')
|
|
|
|
# 플레이어 버튼
|
|
btn_nm = root1_frm1_frm3_frm1_btn1.cget('text')
|
|
|
|
# 조언
|
|
after_user_var = root1_frm1_frm4_frm1_lbl10.cget('text')
|
|
|
|
if pattern_var == pattern1:
|
|
if user_var == user1:
|
|
pattern1_btn_cnt = 2
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
|
|
elif user_var == user2:
|
|
pattern1_btn_cnt = pattern1_btn_cnt + 1
|
|
if pattern1_btn_cnt % 3 == 1:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
|
|
# elif pattern_var == pattern2:
|
|
# if user_var == user1:
|
|
# if not pattern2_btn_cnt % 5 < 2:
|
|
# root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
# else:
|
|
# root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
#
|
|
# elif user_var == user2:
|
|
# if not pattern2_btn_cnt % 5 < 2:
|
|
# root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
# else:
|
|
# root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
#
|
|
# pattern2_btn_cnt = pattern2_btn_cnt + 1
|
|
|
|
elif pattern_var == pattern2:
|
|
if user_var == user1:
|
|
# 당첨
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
pattern2_btn_cnt = 1
|
|
# 낙첨
|
|
else:
|
|
if pattern2_btn_cnt % 5 < 2:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
|
|
pattern2_btn_cnt = pattern2_btn_cnt + 1
|
|
|
|
elif user_var == user2:
|
|
# 당첨
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
pattern2_btn_cnt = 1
|
|
|
|
# 낙첨
|
|
else:
|
|
if pattern2_btn_cnt % 5 < 2:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
|
|
pattern2_btn_cnt = pattern2_btn_cnt + 1
|
|
|
|
elif pattern_var == pattern3:
|
|
if user_var == user1:
|
|
# 당첨
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
pattern3_btn_cnt = 0
|
|
# 낙첨
|
|
else:
|
|
pattern3_btn_cnt = pattern3_btn_cnt + 1
|
|
if pattern3_btn_cnt % 5 < 3:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
|
|
elif user_var == user2:
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
pattern3_btn_cnt = 0
|
|
|
|
# 낙첨
|
|
else:
|
|
pattern3_btn_cnt = pattern3_btn_cnt + 1
|
|
if pattern3_btn_cnt % 5 < 3:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
|
|
elif pattern_var == pattern4:
|
|
if user_var == user1:
|
|
# 당첨
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
pattern4_btn_cnt = 1
|
|
|
|
# 낙첨
|
|
else:
|
|
if pattern4_btn_cnt % 6 < 3:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
pattern4_btn_cnt = pattern4_btn_cnt + 1
|
|
|
|
elif user_var == user2:
|
|
# 당첨
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
pattern4_btn_cnt = 1
|
|
|
|
# 낙첨
|
|
else:
|
|
if pattern4_btn_cnt % 6 < 3:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
|
|
pattern4_btn_cnt = pattern4_btn_cnt + 1
|
|
|
|
root1_frm1_frm4_frm1_lbl15.configure(fg=tk_blue, text=btn_nm)
|
|
|
|
if after_user_var == btn_nm:
|
|
spec_bet_var = int(root1_frm1_frm4_frm1_lbl7.cget('text'))
|
|
|
|
root1_frm1_frm4_frm1_lbl9.configure(text='축하합니다')
|
|
step_cnt = step_detecetion(step_cnt)
|
|
|
|
# 배팅 단계
|
|
root1_frm1_frm4_frm1_lbl5.configure(text=f"{step_cnt}/14 단계")
|
|
|
|
# 보유 금액
|
|
root1_frm1_frm4_frm1_lbl6.configure(text=int(amount_var)+int(spec_bet_var))
|
|
|
|
# 배팅 금액
|
|
root1_frm1_frm4_frm1_lbl7.configure(text=spec_bet_var)
|
|
|
|
# 수익금 합
|
|
root1_frm1_frm4_frm1_lbl8.configure(text=int(profit_var) + int(spec_bet_var))
|
|
|
|
# ~으로 배팅
|
|
root1_frm1_frm4_frm1_lbl12.configure(text=spec_bet_var)
|
|
|
|
##################### 계산 끝 #####################
|
|
|
|
mart_bet_var = step_incresing(step_cnt, int(bet_var_split))
|
|
|
|
if step_cnt > 0:
|
|
# 배팅 금액
|
|
root1_frm1_frm4_frm1_lbl7.configure(text=mart_bet_var)
|
|
|
|
# ~으로 배팅
|
|
root1_frm1_frm4_frm1_lbl12.configure(text=mart_bet_var)
|
|
|
|
else:
|
|
spec_bet_var = int(root1_frm1_frm4_frm1_lbl7.cget('text'))
|
|
|
|
root1_frm1_frm4_frm1_lbl9.configure(text='낙첨입니다')
|
|
step_cnt = step_cnt + 1
|
|
root1_frm1_frm4_frm1_lbl5.configure(text=f"{step_cnt}/14 단계")
|
|
|
|
# 보유 금액
|
|
root1_frm1_frm4_frm1_lbl6.configure(text=int(amount_var)-int(spec_bet_var))
|
|
|
|
# 배팅 금액
|
|
root1_frm1_frm4_frm1_lbl7.configure(text=spec_bet_var)
|
|
|
|
# 수익금 합
|
|
root1_frm1_frm4_frm1_lbl8.configure(text=int(profit_var) - int(spec_bet_var))
|
|
|
|
# ~으로 배팅
|
|
root1_frm1_frm4_frm1_lbl12.configure(text=spec_bet_var)
|
|
|
|
##################### 계산 끝 #####################
|
|
|
|
mart_bet_var = step_incresing(step_cnt, int(bet_var_split))
|
|
|
|
if step_cnt > 0:
|
|
# 배팅 금액
|
|
root1_frm1_frm4_frm1_lbl7.configure(text=mart_bet_var)
|
|
|
|
# ~으로 배팅
|
|
root1_frm1_frm4_frm1_lbl12.configure(text=mart_bet_var)
|
|
|
|
# 파산 감지
|
|
tot_amount_var = root1_frm1_frm4_frm1_lbl6.cget('text')
|
|
bankruptcy_detection(tot_amount_var)
|
|
|
|
|
|
else:
|
|
msg_error('꽝입니다')
|
|
reset_btn_func()
|
|
else:
|
|
root1_frm1_frm3_frm1_btn1.focus_set()
|
|
msg_error('적용 버튼을 눌러주세요')
|
|
|
|
def banker_btn_func():
|
|
global apply_pattern1_btn_cnt, pattern1_btn_cnt, pattern2_btn_cnt, pattern3_btn_cnt, pattern4_btn_cnt, step_cnt
|
|
|
|
if apply_pattern1_btn_cnt == 1:
|
|
root1_frm1_frm3_frm1_btn2.focus_set()
|
|
|
|
if step_cnt < 14:
|
|
# 배팅 금액
|
|
bet_var = root1_frm1_frm1_frm2_cbb1.get()
|
|
bet_var_split = int(bet_var.split('원')[0])
|
|
|
|
# 수수료 적용된 배팅 금액
|
|
bank_fee = round(bet_var_split * 0.93)
|
|
|
|
# 보유 금액
|
|
amount_var = root1_frm1_frm4_frm1_lbl6.cget('text')
|
|
|
|
# 선수
|
|
user_var = root1_variety1.get()
|
|
|
|
# 패턴
|
|
pattern_var = root1_variety2.get()
|
|
|
|
# 수익금
|
|
profit_var = root1_frm1_frm4_frm1_lbl8.cget('text')
|
|
|
|
# 플레이어 버튼
|
|
btn_nm = root1_frm1_frm3_frm1_btn2.cget('text')
|
|
|
|
# 조언
|
|
after_user_var = root1_frm1_frm4_frm1_lbl10.cget('text')
|
|
|
|
if pattern_var == pattern1:
|
|
if user_var == user1:
|
|
pattern1_btn_cnt = pattern1_btn_cnt + 1
|
|
if pattern1_btn_cnt % 3 == 1:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
|
|
elif user_var == user2:
|
|
pattern1_btn_cnt = 2
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
|
|
# elif pattern_var == pattern2:
|
|
# if user_var == user1:
|
|
# if not pattern2_btn_cnt % 5 < 2:
|
|
# root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
# else:
|
|
# root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
#
|
|
# elif user_var == user2:
|
|
# if not pattern2_btn_cnt % 5 < 2:
|
|
# root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
# else:
|
|
# root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
#
|
|
# pattern2_btn_cnt = pattern2_btn_cnt + 1
|
|
|
|
|
|
|
|
elif pattern_var == pattern2:
|
|
if user_var == user1:
|
|
# 당첨
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
pattern2_btn_cnt = 1
|
|
# 낙첨
|
|
else:
|
|
if pattern2_btn_cnt % 5 < 2:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
|
|
pattern2_btn_cnt = pattern2_btn_cnt + 1
|
|
|
|
elif user_var == user2:
|
|
# 당첨
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
pattern2_btn_cnt = 1
|
|
|
|
# 낙첨
|
|
else:
|
|
if pattern2_btn_cnt % 5 < 2:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
|
|
pattern2_btn_cnt = pattern2_btn_cnt + 1
|
|
|
|
elif pattern_var == pattern3:
|
|
if user_var == user1:
|
|
# 당첨
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
pattern3_btn_cnt = 0
|
|
|
|
# 낙첨
|
|
else:
|
|
pattern3_btn_cnt = pattern3_btn_cnt + 1
|
|
if pattern3_btn_cnt % 5 < 3:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
|
|
elif user_var == user2:
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
pattern3_btn_cnt = 0
|
|
|
|
# 낙첨
|
|
else:
|
|
pattern3_btn_cnt = pattern3_btn_cnt + 1
|
|
if pattern3_btn_cnt % 5 < 3:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
|
|
elif pattern_var == pattern4:
|
|
if user_var == user1:
|
|
# 당첨
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
pattern4_btn_cnt = 1
|
|
# 낙첨
|
|
else:
|
|
if pattern4_btn_cnt % 6 < 3:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
|
|
pattern4_btn_cnt = pattern4_btn_cnt + 1
|
|
|
|
elif user_var == user2:
|
|
# 당첨
|
|
if after_user_var == btn_nm:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
pattern4_btn_cnt = 1
|
|
|
|
# 낙첨
|
|
else:
|
|
if pattern4_btn_cnt % 6 < 3:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_red, text=user2)
|
|
else:
|
|
root1_frm1_frm4_frm1_lbl10.configure(fg=tk_blue, text=user1)
|
|
|
|
pattern4_btn_cnt = pattern4_btn_cnt + 1
|
|
|
|
root1_frm1_frm4_frm1_lbl15.configure(fg=tk_red, text=btn_nm)
|
|
|
|
if after_user_var == btn_nm:
|
|
spec_bet_var = int(root1_frm1_frm4_frm1_lbl7.cget('text'))
|
|
|
|
root1_frm1_frm4_frm1_lbl9.configure(text='축하합니다')
|
|
step_cnt = step_detecetion(step_cnt)
|
|
|
|
# 배팅 단계
|
|
root1_frm1_frm4_frm1_lbl5.configure(text=f"{step_cnt}/14 단계")
|
|
|
|
# 보유 금액
|
|
root1_frm1_frm4_frm1_lbl6.configure(text=int(amount_var) + round(int(spec_bet_var)*0.93))
|
|
|
|
# 배팅 금액
|
|
root1_frm1_frm4_frm1_lbl7.configure(text=spec_bet_var)
|
|
|
|
# 수익금 합
|
|
root1_frm1_frm4_frm1_lbl8.configure(text=int(profit_var) + round(int(spec_bet_var)*0.93))
|
|
|
|
# ~으로 배팅
|
|
root1_frm1_frm4_frm1_lbl12.configure(text=spec_bet_var)
|
|
|
|
##################### 계산 끝 #####################
|
|
|
|
mart_bet_var = step_incresing(step_cnt, int(bet_var_split))
|
|
|
|
if step_cnt > 0:
|
|
# 배팅 금액
|
|
root1_frm1_frm4_frm1_lbl7.configure(text=mart_bet_var)
|
|
|
|
# ~으로 배팅
|
|
root1_frm1_frm4_frm1_lbl12.configure(text=mart_bet_var)
|
|
|
|
else:
|
|
spec_bet_var = int(root1_frm1_frm4_frm1_lbl7.cget('text'))
|
|
|
|
root1_frm1_frm4_frm1_lbl9.configure(text='낙첨입니다')
|
|
step_cnt = step_cnt + 1
|
|
root1_frm1_frm4_frm1_lbl5.configure(text=f"{step_cnt}/14 단계")
|
|
|
|
# mart_bet_var = step_incresing(step_cnt, int(spec_bet_var))
|
|
# print(f'{step_cnt}, {int(spec_bet_var)}, {mart_bet_var}')
|
|
|
|
# 보유 금액
|
|
root1_frm1_frm4_frm1_lbl6.configure(text=int(amount_var) - int(spec_bet_var))
|
|
|
|
# 배팅 금액
|
|
root1_frm1_frm4_frm1_lbl7.configure(text=spec_bet_var)
|
|
# root1_frm1_frm2_lbl8.configure(text=int(after_bet_var) - spec_bet_var)
|
|
|
|
# 수익금 합
|
|
root1_frm1_frm4_frm1_lbl8.configure(text=int(profit_var) - int(spec_bet_var))
|
|
|
|
# ~으로 배팅
|
|
root1_frm1_frm4_frm1_lbl12.configure(text=spec_bet_var)
|
|
|
|
##################### 계산 끝 #####################
|
|
|
|
mart_bet_var = step_incresing(step_cnt, int(bet_var_split))
|
|
|
|
if step_cnt > 0:
|
|
# 배팅 금액
|
|
root1_frm1_frm4_frm1_lbl7.configure(text=mart_bet_var)
|
|
|
|
# ~으로 배팅
|
|
root1_frm1_frm4_frm1_lbl12.configure(text=mart_bet_var)
|
|
|
|
# 파산 감지
|
|
tot_amount_var = root1_frm1_frm4_frm1_lbl6.cget('text')
|
|
bankruptcy_detection(tot_amount_var)
|
|
|
|
|
|
else:
|
|
msg_error('꽝입니다')
|
|
reset_btn_func()
|
|
|
|
else:
|
|
root1_frm1_frm3_frm1_btn1.focus_set()
|
|
msg_error('적용 버튼을 눌러주세요')
|
|
|
|
def down_btn_func():
|
|
global apply_pattern1_btn_cnt, step_cnt
|
|
|
|
if apply_pattern1_btn_cnt == 1:
|
|
root1_frm1_frm3_frm1_btn2.focus_set()
|
|
|
|
bet_var = root1_frm1_frm1_frm2_cbb1.get()
|
|
bet_var_split = int(bet_var.split('원')[0])
|
|
|
|
step_cnt = step_down(step_cnt)
|
|
|
|
mart_bet_var = step_incresing(step_cnt, int(bet_var_split))
|
|
|
|
if step_cnt > 0:
|
|
root1_frm1_frm4_frm1_lbl5.configure(text=f"{step_cnt}/14 단계")
|
|
|
|
root1_frm1_frm4_frm1_lbl7.configure(text=mart_bet_var)
|
|
|
|
root1_frm1_frm4_frm1_lbl12.configure(text=mart_bet_var)
|
|
|
|
else:
|
|
root1_frm1_frm2_btn1.focus_set()
|
|
msg_error('시작 버튼을 눌러주세요')
|
|
|
|
def reset_btn_func():
|
|
global apply_pattern1_btn_cnt, enter_user_btn_cnt
|
|
|
|
apply_pattern1_btn_cnt = 0
|
|
enter_user_btn_cnt = 0
|
|
|
|
root1_frm1_frm4_frm1_btn2.focus_set()
|
|
|
|
root1_frm1_frm1_frm3_rcb1.configure(state="normal")
|
|
root1_frm1_frm1_frm3_rcb2.configure(state="normal")
|
|
|
|
for label in labels:
|
|
label.config(text='')
|
|
|
|
root1_frm1_frm1_frm4_btn1.configure(state="normal")
|
|
root1_frm1_frm1_frm4_btn2.configure(state="normal")
|
|
root1_frm1_frm1_frm4_btn3.configure(state="normal")
|
|
root1_frm1_frm1_frm4_btn4.configure(state="normal")
|
|
|
|
root1_frm1_frm1_frm4_lbl2.configure(text='')
|
|
|
|
root1_frm1_frm1_frm5_rcb1.configure(state="normal")
|
|
root1_frm1_frm1_frm5_rcb2.configure(state="normal")
|
|
root1_frm1_frm1_frm5_rcb3.configure(state="normal")
|
|
root1_frm1_frm1_frm5_rcb4.configure(state="normal")
|
|
|
|
root1_frm1_frm4_frm1_lbl5.configure(text="")
|
|
root1_frm1_frm4_frm1_lbl6.configure(text="")
|
|
root1_frm1_frm4_frm1_lbl7.configure(text="")
|
|
root1_frm1_frm4_frm1_lbl8.configure(text="")
|
|
|
|
root1_frm1_frm4_frm1_lbl15.configure(text="")
|
|
root1_frm1_frm4_frm1_lbl9.configure(text="")
|
|
root1_frm1_frm4_frm1_lbl10.configure(text="")
|
|
root1_frm1_frm4_frm1_lbl12.configure(text="")
|
|
|
|
root1_frm1_cvs1.yview_moveto('0.0')
|
|
|
|
def step_detecetion(var1):
|
|
if var1 > 1 and var1 < 4:
|
|
var1 = var1 - 1
|
|
return var1
|
|
|
|
elif var1 > 3 and var1 < 13:
|
|
var1 = var1 - 2
|
|
return var1
|
|
|
|
elif var1 > 12 and var1 < 15:
|
|
var1 = var1 - 3
|
|
return var1
|
|
else:
|
|
return var1
|
|
|
|
def step_down(var1):
|
|
if var1 > 1 and var1 < 3:
|
|
var1 = var1 - 1
|
|
return var1
|
|
|
|
elif var1 > 2 and var1 < 15:
|
|
var1 = var1 - 2
|
|
return var1
|
|
else:
|
|
return var1
|
|
|
|
def step_incresing(var1, var2):
|
|
formula_1 = var2
|
|
|
|
formula_2 = formula_1*2
|
|
|
|
formula_3 = formula_1 + formula_2
|
|
|
|
formula_4 = formula_2 + formula_3
|
|
|
|
formula_5 = formula_3 + formula_4
|
|
|
|
formula_6 = formula_4 + formula_5
|
|
|
|
formula_7 = formula_5 + formula_6
|
|
|
|
formula_8 = formula_6 + formula_7
|
|
|
|
formula_9 = formula_7 + formula_8
|
|
|
|
formula_10 = formula_8 + formula_9
|
|
|
|
formula_11 = formula_9 + formula_10
|
|
|
|
formula_12 = formula_10 + formula_11
|
|
|
|
if var1 == 1:
|
|
return formula_1
|
|
elif var1 == 2:
|
|
return formula_2
|
|
elif var1 == 3:
|
|
return formula_3
|
|
elif var1 == 4:
|
|
return formula_4
|
|
elif var1 == 5:
|
|
return formula_5
|
|
elif var1 == 6:
|
|
return formula_6
|
|
elif var1 == 7:
|
|
return formula_7
|
|
elif var1 == 8:
|
|
return formula_8
|
|
elif var1 == 9:
|
|
return formula_9
|
|
elif var1 == 10:
|
|
return formula_10
|
|
elif var1 == 11 or var1 == 13 or var1 == 14:
|
|
return formula_11
|
|
elif var1 == 12:
|
|
return formula_12
|
|
|
|
def bankruptcy_detection(var1):
|
|
if var1 < 0:
|
|
msg_error('파산하였습니다')
|
|
|
|
def on_configure(event):
|
|
root1_frm1_cvs1.configure(scrollregion=root1_frm1_cvs1.bbox('all'))
|
|
|
|
def frame_increasing(cnt, tk_x, tk_y):
|
|
# 1
|
|
if cnt > 0 and cnt < 2:
|
|
return tk_x, tk_y
|
|
|
|
# 2,3,4,5,6
|
|
elif cnt > 1 and cnt < 7:
|
|
tk_x = tk_x + 116
|
|
tk_y = 20
|
|
return tk_x, tk_y
|
|
|
|
elif cnt > 6 and cnt < 8:
|
|
return tk_x, tk_y
|
|
|
|
# 7,8,9,10,11,12
|
|
elif cnt > 7 and cnt < 13:
|
|
tk_x = tk_x + 116
|
|
tk_y = 69
|
|
return tk_x, tk_y
|
|
|
|
def msg_error(msg):
|
|
tkinter.messagebox.showerror("ERROR", msg)
|
|
|
|
root1 = tk.Tk()
|
|
root1.overrideredirect(False)
|
|
|
|
root1_window_width = 798
|
|
root1_window_height = 768
|
|
|
|
root1_window_width_func = root1.winfo_screenwidth()
|
|
root1_window_height_func = root1.winfo_screenheight()
|
|
|
|
root1_width_margin = int((root1_window_width_func / 2) - (root1_window_width / 2))
|
|
root1_height_margin = int((root1_window_height_func / 2) - (root1_window_height / 2))
|
|
|
|
root1.geometry(f"{root1_window_width}x{root1_window_height}+{root1_width_margin}+{root1_height_margin}")
|
|
|
|
root1.option_add('*TCombobox*Listbox.foreground', tk_white)
|
|
root1.option_add('*TCombobox*Listbox.background', tk_black)
|
|
root1.option_add("*TCombobox*Listbox*Font", mal_18_bold)
|
|
|
|
style = ttk.Style(root1)
|
|
style.configure("TRadiobutton",
|
|
background=tk_quick_silver,
|
|
font=("Arial", 14))
|
|
|
|
style.theme_use('default')
|
|
style.configure('TCombobox',
|
|
fieldbackground=tk_black,
|
|
background=tk_black,
|
|
bordercolor=tk_black,
|
|
selectbackground='',
|
|
borderwidth=0,
|
|
relief='flat',
|
|
arrowcolor=tk_white,
|
|
arrowsize=15,
|
|
insertcolor=tk_black,
|
|
foreground=tk_white,
|
|
selectforeground=tk_white)
|
|
|
|
style.map('TCombobox',
|
|
fieldbackground=[('readonly', tk_black)])
|
|
|
|
pixel_virtual = tk.PhotoImage(width=1, height=1)
|
|
root1_variety1 = tk.StringVar()
|
|
root1_variety2 = tk.StringVar()
|
|
|
|
root1_variety1.set(user1)
|
|
root1_variety2.set(pattern1)
|
|
|
|
root1_windows = tk.Frame(root1)
|
|
root1_windows.configure(width=root1_window_width, height=root1_window_height, bg=tk_black)
|
|
root1_windows.place(x=0, y=0)
|
|
|
|
root1_frm1 = tk.Frame(root1_windows)
|
|
root1_frm1.configure(width=742, height=712, bg=tk_black)
|
|
root1_frm1.place(x=28, y=28)
|
|
|
|
root1_windows_scr1 = tk.Scrollbar(root1_windows, orient="vertical")
|
|
|
|
root1_frm1_cvs1 = tk.Canvas(root1_frm1)
|
|
root1_frm1_cvs1.configure(width=742, height=712, bg=tk_black, highlightthickness=0, bd=0, yscrollcommand=root1_windows_scr1.set)
|
|
root1_frm1_cvs1.place(x=0, y=0)
|
|
|
|
root1_frm1_cvs1_frm1 = tk.Frame(root1_frm1_cvs1)
|
|
root1_frm1_cvs1_frm1.place(x=0, y=0)
|
|
root1_frm1_cvs1_frm1.bind('<Configure>', on_configure)
|
|
|
|
root1_frm1_cvs1.create_window(0, 0, window=root1_frm1_cvs1_frm1)
|
|
|
|
root1_windows_scr1.configure(command=root1_frm1_cvs1.yview)
|
|
root1_windows_scr1.place(width=16, height=712, x=770, y=28)
|
|
|
|
root1_frm1_frm1 = tk.Frame(root1_frm1_cvs1_frm1)
|
|
root1_frm1_frm1.configure(width=742, height=467, bg=tk_black)
|
|
root1_frm1_frm1.place(x=0, y=0)
|
|
|
|
root1_frm1_frm1_frm1 = tk.Frame(root1_frm1_frm1)
|
|
root1_frm1_frm1_frm1.configure(width=362, height=55, bg=tk_black, highlightbackground=tk_chinese_silver, highlightthickness=1)
|
|
root1_frm1_frm1_frm1.place(x=0, y=0)
|
|
|
|
root1_frm1_frm1_frm1_lbl1 = tk.Label(root1_frm1_frm1_frm1, text="개시", font=mal_18_bold)
|
|
root1_frm1_frm1_frm1_lbl1.configure(bg=tk_black, fg=tk_red)
|
|
root1_frm1_frm1_frm1_lbl1.place(height=33, x=10, y=10)
|
|
|
|
root1_frm1_frm1_frm1_lbl1 = tk.Label(root1_frm1_frm1_frm1, text="금액", font=mal_18_bold)
|
|
root1_frm1_frm1_frm1_lbl1.configure(bg=tk_black, fg=tk_white)
|
|
root1_frm1_frm1_frm1_lbl1.place(height=33, x=64, y=10)
|
|
|
|
root1_frm1_frm1_frm1_ety1 = tk.Entry(root1_frm1_frm1_frm1)
|
|
root1_frm1_frm1_frm1_ety1.configure(bg=tk_black, fg=tk_white, insertbackground=tk_white, insertwidth=1, font=mal_18_bold, bd=0, justify='right')
|
|
root1_frm1_frm1_frm1_ety1.place(width=210, height=33, x=140, y=10)
|
|
root1_frm1_frm1_frm1_ety1.insert(0, 10000000)
|
|
|
|
root1_frm1_frm1_frm2 = tk.Frame(root1_frm1_frm1)
|
|
root1_frm1_frm1_frm2.configure(width=362, height=55, bg=tk_black, highlightbackground=tk_chinese_silver, highlightthickness=1)
|
|
root1_frm1_frm1_frm2.place(x=380, y=0)
|
|
|
|
root1_frm1_frm1_frm2_lbl1 = tk.Label(root1_frm1_frm1_frm2, text="배팅", font=mal_18_bold)
|
|
root1_frm1_frm1_frm2_lbl1.configure(bg=tk_black, fg=tk_red)
|
|
root1_frm1_frm1_frm2_lbl1.place(height=33, x=10, y=10)
|
|
|
|
root1_frm1_frm1_frm2_lbl2 = tk.Label(root1_frm1_frm1_frm2, text="단위", font=mal_18_bold)
|
|
root1_frm1_frm1_frm2_lbl2.configure(bg=tk_black, fg=tk_white)
|
|
root1_frm1_frm1_frm2_lbl2.place(height=33, x=64, y=10)
|
|
|
|
root1_frm1_frm1_frm2_cbb1 = ttk.Combobox(root1_frm1_frm1_frm2)
|
|
root1_frm1_frm1_frm2_cbb1.configure(state="readonly", font=mal_18_bold, value=bet_list, justify='right')
|
|
root1_frm1_frm1_frm2_cbb1.place(width=210, height=33, x=140, y=10)
|
|
root1_frm1_frm1_frm2_cbb1.set('10000원')
|
|
|
|
root1_frm1_frm1_frm3 = tk.Frame(root1_frm1_frm1)
|
|
root1_frm1_frm1_frm3.configure(width=742, height=55, bg=tk_black, highlightbackground=tk_chinese_silver, highlightthickness=1)
|
|
root1_frm1_frm1_frm3.place(x=0, y=72)
|
|
|
|
root1_frm1_frm1_frm3_lbl1 = tk.Label(root1_frm1_frm1_frm3, text="시작 방향 선택", font=mal_18_bold)
|
|
root1_frm1_frm1_frm3_lbl1.configure(bg=tk_black, fg=tk_white)
|
|
root1_frm1_frm1_frm3_lbl1.place(height=33, x=10, y=10)
|
|
|
|
root1_frm1_frm1_frm3_rcb1 = tk.Radiobutton(root1_frm1_frm1_frm3, text=user1, value=user1, variable=root1_variety1, font=mal_18_bold)
|
|
root1_frm1_frm1_frm3_rcb1.configure(bg=tk_black, fg=tk_blue, activebackground=tk_black, activeforeground=tk_blue, selectcolor=tk_black)
|
|
root1_frm1_frm1_frm3_rcb1.place(height=33, x=312, y=10)
|
|
|
|
root1_frm1_frm1_frm3_rcb2 = tk.Radiobutton(root1_frm1_frm1_frm3, text=user2, value=user2, variable=root1_variety1, font=mal_18_bold)
|
|
root1_frm1_frm1_frm3_rcb2.configure(bg=tk_black, fg=tk_red, activebackground=tk_black, activeforeground=tk_red, selectcolor=tk_black)
|
|
root1_frm1_frm1_frm3_rcb2.place(height=33, x=516, y=10)
|
|
|
|
root1_frm1_frm1_frm4 = tk.Frame(root1_frm1_frm1)
|
|
root1_frm1_frm1_frm4.configure(width=742, height=251, bg=tk_black, highlightbackground=tk_chinese_silver, highlightthickness=1)
|
|
root1_frm1_frm1_frm4.place(x=0, y=144)
|
|
|
|
root1_frm1_frm1_frm4_btn1 = tk.Button(root1_frm1_frm1_frm4, text=f'{user1} 입력', font=mal_10_bold)
|
|
root1_frm1_frm1_frm4_btn1.configure(image=pixel_virtual, compound=tk.CENTER,
|
|
bg=tk_royal_blue, fg=tk_white, relief='solid', command=enter_player_btn_func)
|
|
root1_frm1_frm1_frm4_btn1.place(width=101, height=50, x=145, y=137)
|
|
|
|
root1_frm1_frm1_frm4_btn2 = tk.Button(root1_frm1_frm1_frm4, text=f'{user2} 입력', font=mal_10_bold)
|
|
root1_frm1_frm1_frm4_btn2.configure(image=pixel_virtual, compound=tk.CENTER,
|
|
bg=tk_carmine_pink, fg=tk_white, relief='solid', command=enter_banker_btn_func)
|
|
root1_frm1_frm1_frm4_btn2.place(width=101, height=50, x=261, y=137)
|
|
|
|
root1_frm1_frm1_frm4_btn3 = tk.Button(root1_frm1_frm1_frm4, text='되돌리기', font=mal_10_bold)
|
|
root1_frm1_frm1_frm4_btn3.configure(image=pixel_virtual, compound=tk.CENTER,
|
|
bg=tk_deep_fuchsia, fg=tk_white, relief='solid', command=undo_btn_func)
|
|
root1_frm1_frm1_frm4_btn3.place(width=101, height=50, x=377, y=137)
|
|
|
|
root1_frm1_frm1_frm4_btn4 = tk.Button(root1_frm1_frm1_frm4, text='분석 시작', font=mal_10_bold)
|
|
root1_frm1_frm1_frm4_btn4.configure(image=pixel_virtual, compound=tk.CENTER,
|
|
bg=tk_gold_metallic, fg=tk_davys_grey, relief='solid', command=analysis_pattern_btn_func)
|
|
root1_frm1_frm1_frm4_btn4.place(width=101, height=50, x=493, y=137)
|
|
|
|
root1_frm1_frm1_frm4_lbl1 = tk.Label(root1_frm1_frm1_frm4, text="추천 드리는 패턴은", font=mal_18_bold)
|
|
root1_frm1_frm1_frm4_lbl1.configure(bg=tk_black, fg=tk_white)
|
|
root1_frm1_frm1_frm4_lbl1.place(height=32, x=207, y=200)
|
|
|
|
root1_frm1_frm1_frm4_lbl2 = tk.Label(root1_frm1_frm1_frm4, font=mal_18_bold)
|
|
root1_frm1_frm1_frm4_lbl2.configure(bg=tk_black, fg=tk_gold_metallic)
|
|
root1_frm1_frm1_frm4_lbl2.place(height=32, x=419, y=200)
|
|
|
|
root1_frm1_frm1_frm4_lbl3 = tk.Label(root1_frm1_frm1_frm4, text="입니다", font=mal_18_bold)
|
|
root1_frm1_frm1_frm4_lbl3.configure(bg=tk_black, fg=tk_white)
|
|
root1_frm1_frm1_frm4_lbl3.place(height=32, x=454, y=200)
|
|
|
|
root1_frm1_frm1_frm5 = tk.Frame(root1_frm1_frm1)
|
|
root1_frm1_frm1_frm5.configure(width=742, height=55, bg=tk_black, highlightbackground=tk_chinese_silver, highlightthickness=1)
|
|
root1_frm1_frm1_frm5.place(x=0, y=412)
|
|
|
|
root1_frm1_frm1_frm5_lbl1 = tk.Label(root1_frm1_frm1_frm5, text="패턴 선택", font=mal_18_bold)
|
|
root1_frm1_frm1_frm5_lbl1.configure(bg=tk_black, fg=tk_white)
|
|
root1_frm1_frm1_frm5_lbl1.place(height=33, x=10, y=10)
|
|
|
|
root1_frm1_frm1_frm5_rcb1 = tk.Radiobutton(root1_frm1_frm1_frm5, text=pattern1, value=pattern1, variable=root1_variety2, font=mal_18_bold)
|
|
root1_frm1_frm1_frm5_rcb1.configure(bg=tk_black, fg=tk_white, activebackground=tk_black, activeforeground=tk_white, selectcolor=tk_black)
|
|
root1_frm1_frm1_frm5_rcb1.place(height=33, x=221, y=10)
|
|
|
|
root1_frm1_frm1_frm5_rcb2 = tk.Radiobutton(root1_frm1_frm1_frm5, text=pattern2, value=pattern2, variable=root1_variety2, font=mal_18_bold)
|
|
root1_frm1_frm1_frm5_rcb2.configure(bg=tk_black, fg=tk_white, activebackground=tk_black, activeforeground=tk_white, selectcolor=tk_black)
|
|
root1_frm1_frm1_frm5_rcb2.place(height=33, x=325, y=10)
|
|
|
|
root1_frm1_frm1_frm5_rcb3 = tk.Radiobutton(root1_frm1_frm1_frm5, text=pattern3, value=pattern3, variable=root1_variety2, font=mal_18_bold)
|
|
root1_frm1_frm1_frm5_rcb3.configure(bg=tk_black, fg=tk_white, activebackground=tk_black, activeforeground=tk_white, selectcolor=tk_black)
|
|
root1_frm1_frm1_frm5_rcb3.place(height=33, x=429, y=10)
|
|
|
|
root1_frm1_frm1_frm5_rcb4 = tk.Radiobutton(root1_frm1_frm1_frm5, text=pattern4, value=pattern4, variable=root1_variety2, font=mal_18_bold)
|
|
root1_frm1_frm1_frm5_rcb4.configure(bg=tk_black, fg=tk_white, activebackground=tk_black, activeforeground=tk_white, selectcolor=tk_black)
|
|
root1_frm1_frm1_frm5_rcb4.place(height=33, x=533, y=10)
|
|
|
|
root1_frm1_frm2 = tk.Frame(root1_frm1_cvs1_frm1)
|
|
root1_frm1_frm2.configure(width=742, height=89, bg=tk_black)
|
|
root1_frm1_frm2.place(x=0, y=467)
|
|
|
|
root1_frm1_frm2_btn1 = tk.Button(root1_frm1_frm2, text='적용', font=mal_18_bold)
|
|
root1_frm1_frm2_btn1.configure(image=pixel_virtual, compound=tk.CENTER,
|
|
bg=tk_gold_metallic, fg=tk_davys_grey, relief='solid', command=apply_btn_func)
|
|
root1_frm1_frm2_btn1.place(width=488, height=55, x=127, y=17)
|
|
|
|
root1_frm1_frm3 = tk.Frame(root1_frm1_cvs1_frm1)
|
|
root1_frm1_frm3.configure(width=742, height=125, bg=tk_black)
|
|
root1_frm1_frm3.place(x=0, y=556)
|
|
|
|
root1_frm1_frm3_frm1 = tk.Frame(root1_frm1_frm3)
|
|
root1_frm1_frm3_frm1.configure(width=742, height=125, bg=tk_black, highlightbackground=tk_chinese_silver, highlightthickness=1)
|
|
root1_frm1_frm3_frm1.place(x=0, y=0)
|
|
|
|
root1_frm1_frm3_frm1_btn1 = tk.Button(root1_frm1_frm3_frm1, text=user1, font=mal_18_bold)
|
|
root1_frm1_frm3_frm1_btn1.configure(image=pixel_virtual, compound=tk.CENTER,
|
|
bg=tk_royal_blue, fg=tk_white, relief='solid', command=player_btn_func)
|
|
root1_frm1_frm3_frm1_btn1.place(width=207, height=89, x=127, y=18)
|
|
|
|
root1_frm1_frm3_frm1_btn2 = tk.Button(root1_frm1_frm3_frm1, text=user2, font=mal_18_bold)
|
|
root1_frm1_frm3_frm1_btn2.configure(image=pixel_virtual, compound=tk.CENTER,
|
|
bg=tk_carmine_pink, fg=tk_white, relief='solid', command=banker_btn_func)
|
|
root1_frm1_frm3_frm1_btn2.place(width=207, height=89, x=407, y=18)
|
|
|
|
root1_frm1_frm4 = tk.Frame(root1_frm1_cvs1_frm1)
|
|
root1_frm1_frm4.configure(width=742, height=282, bg=tk_black)
|
|
root1_frm1_frm4.place(x=0, y=698)
|
|
|
|
root1_frm1_frm4_frm1 = tk.Frame(root1_frm1_frm4)
|
|
root1_frm1_frm4_frm1.configure(width=742, height=282, bg=tk_raisin_black, highlightbackground=tk_chinese_silver, highlightthickness=1)
|
|
root1_frm1_frm4_frm1.place(x=0, y=0)
|
|
|
|
root1_frm1_frm4_frm1_lbl1 = tk.Label(root1_frm1_frm4_frm1, text="배팅 단계 :", font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl1.configure(bg=tk_raisin_black, fg=tk_white)
|
|
root1_frm1_frm4_frm1_lbl1.place(height=33, x=109, y=20)
|
|
|
|
root1_frm1_frm4_frm1_lbl2 = tk.Label(root1_frm1_frm4_frm1, text="보유 금액 :", font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl2.configure(bg=tk_raisin_black, fg=tk_white)
|
|
root1_frm1_frm4_frm1_lbl2.place(height=33, x=109, y=55)
|
|
|
|
root1_frm1_frm4_frm1_lbl3 = tk.Label(root1_frm1_frm4_frm1, text="배팅 금액 :", font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl3.configure(bg=tk_raisin_black, fg=tk_white)
|
|
root1_frm1_frm4_frm1_lbl3.place(height=33, x=109, y=90)
|
|
|
|
root1_frm1_frm4_frm1_lbl4 = tk.Label(root1_frm1_frm4_frm1, text="수익금 합 :", font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl4.configure(bg=tk_raisin_black, fg=tk_white)
|
|
root1_frm1_frm4_frm1_lbl4.place(height=33, x=109, y=125)
|
|
|
|
# 배팅 단계
|
|
root1_frm1_frm4_frm1_lbl5 = tk.Label(root1_frm1_frm4_frm1, font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl5.configure(bg=tk_raisin_black, fg=tk_white, anchor="w")
|
|
root1_frm1_frm4_frm1_lbl5.place(height=33, x=232, y=20)
|
|
|
|
# 보유 금액
|
|
root1_frm1_frm4_frm1_lbl6 = tk.Label(root1_frm1_frm4_frm1, font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl6.configure(bg=tk_raisin_black, fg=tk_white, anchor="w")
|
|
root1_frm1_frm4_frm1_lbl6.place(height=33, x=232, y=55)
|
|
|
|
# 배팅 금액
|
|
root1_frm1_frm4_frm1_lbl7 = tk.Label(root1_frm1_frm4_frm1, font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl7.configure(bg=tk_raisin_black, fg=tk_white, anchor="w")
|
|
root1_frm1_frm4_frm1_lbl7.place(height=33, x=232, y=90)
|
|
|
|
# 수익금 합
|
|
root1_frm1_frm4_frm1_lbl8 = tk.Label(root1_frm1_frm4_frm1, font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl8.configure(bg=tk_raisin_black, fg=tk_white, anchor="w")
|
|
root1_frm1_frm4_frm1_lbl8.place(height=33, x=232, y=125)
|
|
|
|
root1_frm1_frm4_frm1_lbl14 = tk.Label(root1_frm1_frm4_frm1, font=mal_13_bold, text="실제 결과 :")
|
|
root1_frm1_frm4_frm1_lbl14.configure(bg=tk_raisin_black, fg=tk_white)
|
|
root1_frm1_frm4_frm1_lbl14.place(height=26, x=409, y=20)
|
|
|
|
root1_frm1_frm4_frm1_lbl15 = tk.Label(root1_frm1_frm4_frm1, font=mal_13_bold)
|
|
root1_frm1_frm4_frm1_lbl15.configure(bg=tk_raisin_black, fg=tk_white, anchor='e')
|
|
root1_frm1_frm4_frm1_lbl15.place(height=26, x=499, y=20)
|
|
|
|
root1_frm1_frm4_frm1_lbl9 = tk.Label(root1_frm1_frm4_frm1, font=mal_21_bold)
|
|
root1_frm1_frm4_frm1_lbl9.configure(bg=tk_raisin_black, fg=tk_white)
|
|
root1_frm1_frm4_frm1_lbl9.place(height=33, x=409, y=55)
|
|
|
|
root1_frm1_frm4_frm1_lbl10 = tk.Label(root1_frm1_frm4_frm1, font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl10.configure(bg=tk_raisin_black, fg=tk_white, anchor="e")
|
|
root1_frm1_frm4_frm1_lbl10.place(height=33, x=409, y=90)
|
|
|
|
root1_frm1_frm4_frm1_lbl11 = tk.Label(root1_frm1_frm4_frm1, text="방향", font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl11.configure(bg=tk_raisin_black, fg=tk_white, anchor="w")
|
|
root1_frm1_frm4_frm1_lbl11.place(height=33, x=511, y=90)
|
|
|
|
root1_frm1_frm4_frm1_lbl12 = tk.Label(root1_frm1_frm4_frm1, font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl12.configure(bg=tk_raisin_black, fg=tk_white, anchor="e")
|
|
root1_frm1_frm4_frm1_lbl12.place(width=150, height=33, x=330, y=125)
|
|
|
|
root1_frm1_frm4_frm1_lbl13 = tk.Label(root1_frm1_frm4_frm1, text="원 배팅", font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_lbl13.configure(bg=tk_raisin_black, fg=tk_white, anchor="w")
|
|
root1_frm1_frm4_frm1_lbl13.place(height=33, x=480, y=125)
|
|
|
|
root1_frm1_frm4_frm1_btn1 = tk.Button(root1_frm1_frm4_frm1, text='단계 다운', font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_btn1.configure(image=pixel_virtual, compound=tk.CENTER,
|
|
bg=tk_gold_metallic, fg=tk_white, relief='solid', command=down_btn_func)
|
|
root1_frm1_frm4_frm1_btn1.place(width=130, height=55, x=165, y=201)
|
|
|
|
root1_frm1_frm4_frm1_btn2 = tk.Button(root1_frm1_frm4_frm1, text='초기화', font=mal_18_bold)
|
|
root1_frm1_frm4_frm1_btn2.configure(image=pixel_virtual, compound=tk.CENTER,
|
|
bg=tk_gold_metallic, fg=tk_white, relief='solid', command=reset_btn_func)
|
|
root1_frm1_frm4_frm1_btn2.place(width=130, height=55, x=445, y=201)
|
|
|
|
tk_frame_x = 21
|
|
tk_frame_y = 20
|
|
create_cnt = 0
|
|
|
|
for i in range(12):
|
|
create_cnt = create_cnt + 1
|
|
|
|
tk_frame_x, tk_frame_y = frame_increasing(create_cnt, tk_frame_x, tk_frame_y)
|
|
|
|
tk_frame = tk.Frame(root1_frm1_frm1_frm4)
|
|
tk_frame.configure(width=117, height=50, bg=tk_black, highlightbackground=tk_chinese_silver,
|
|
highlightthickness=1)
|
|
tk_frame.place(x=tk_frame_x, y=tk_frame_y)
|
|
|
|
tk_label = tk.Label(tk_frame)
|
|
tk_label.configure(bg=tk_black, font=mal_13_bold)
|
|
tk_label.place(width=115, height=48, x=0, y=0)
|
|
labels.append(tk_label)
|
|
|
|
if create_cnt == 6:
|
|
tk_frame_x = 21
|
|
tk_frame_y = 69
|
|
|
|
root1_frm1_cvs1_frm1.configure(width=742, height=980, bg=tk_black)
|
|
root1_frm1_cvs1.yview_moveto('0.0')
|
|
|
|
root1.mainloop()
|
|
|
|
# --- variables ---
|
|
bet_list = ['500원',
|
|
'1000원',
|
|
'2000원',
|
|
'3000원',
|
|
'4000원',
|
|
'5000원',
|
|
'10000원',
|
|
'20000원',
|
|
'30000원',
|
|
'50000원']
|
|
|
|
user1 = '플레이어'
|
|
user2 = '뱅커'
|
|
|
|
pattern1 = 'P1'
|
|
pattern2 = 'P2'
|
|
pattern3 = 'P3'
|
|
pattern4 = 'P4'
|
|
|
|
mal_10_bold = ("맑은고딕", 10, 'bold')
|
|
mal_13_bold = ("맑은고딕", 13, 'bold')
|
|
mal_18_bold = ("맑은고딕", 18, 'bold')
|
|
mal_21_bold = ("맑은고딕", 21, 'bold')
|
|
mal_30_bold = ("맑은고딕", 30, 'bold')
|
|
|
|
enter_user_btn_cnt = 0
|
|
apply_pattern1_btn_cnt = 0
|
|
labels = []
|
|
|
|
# --- color_variables ---
|
|
tk_white = '#ffffff'
|
|
tk_black = '#000000'
|
|
tk_red = '#ff0000'
|
|
tk_dim_gray = '#696969'
|
|
tk_quick_silver = '#a0a0a0'
|
|
tk_blue = '#0000ff'
|
|
tk_electric_green = '#00ff00'
|
|
tk_macaroni_and_cheese = "#ffc080"
|
|
tk_patriarch = '#800080'
|
|
|
|
tk_chinese_silver = '#cccccc'
|
|
tk_gold_metallic = '#d5b72c'
|
|
tk_davys_grey = '#555555'
|
|
tk_royal_blue = '#505be4'
|
|
tk_carmine_pink = '#ed4747'
|
|
tk_raisin_black = '#252525'
|
|
tk_deep_fuchsia = '#d757cd'
|
|
|
|
if __name__ == '__main__':
|
|
baccarat_test2() |