代码拉取完成,页面将自动刷新
#!/usr/bin/python
# coding:utf-8
"""
@author: css
@software: PyCharm
@file: Poker.py
@time: 2021/3/3 16:45:02
"""
import cv2
class Poker:
'所有员工的基类'
def __init__(self, name, img, num=4):
self.num = num
self.name = name
h, w = img.shape
# 手牌
self.selfImg = img
self.isUpOut = False
self.isDownOut = False
# 出牌
if name == '王':
self.otherImg = cv2.resize(img, (int(w / 1.8), int(h / 1.8)))
# 底牌
self.handImg = cv2.resize(img, (int(w / 4.1), int(h / 4.1)))
elif name == '8' or name == '9':
self.otherImg = cv2.resize(img, (int(w / 1.3), int(h / 1.3)))
# 底牌
self.handImg = cv2.resize(img, (int(w / 1.9), int(h / 1.9)))
else:
self.otherImg = cv2.resize(img, (int(w / 1.3), int(h / 1.3)))
# 底牌
self.handImg = cv2.resize(img, (int(w / 1.8), int(h / 1.8)))
def setNum(self, num):
self.num = num
def init(self):
if self.name == '王':
self.num = 2
else:
self.num = 4
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。