This commit is contained in:
adrienmalin 2018-08-21 16:23:47 +02:00
parent ce0dfa99c1
commit 2b2600812a
6 changed files with 6 additions and 34 deletions

View File

@ -10,8 +10,8 @@ Parts of comments issued from 2009 Tetris Design Guideline
import sys
from qtpy import QtWidgets
from source.qt5 import QtWidgets
from source.game_gui import Window

View File

@ -3,7 +3,7 @@
import os
from .qt5 import QtGui
from qtpy import QtGui
# Paths

View File

@ -7,10 +7,10 @@ import itertools
import locale
import os
import time
from qtpy import QtWidgets, QtCore, QtGui, QtMultimedia
from . import consts
from .consts import L, R, CLOCKWISE, COUNTERCLOCKWISE
from .qt5 import QtWidgets, QtCore, QtGui, QtMultimedia
from .__version__ import __title__, __author__, __version__
from .point import Point
from .tetromino import Block, Tetromino, GhostPiece

View File

@ -2,8 +2,9 @@
# -*- coding: utf-8 -*-
from qtpy import QtCore
from .consts import CLOCKWISE
from .qt5 import QtCore
class Point(QtCore.QPoint):

View File

@ -1,29 +0,0 @@
# -*- coding: utf-8 -*-
import sys
import os
try:
from PyQt5 import QtWidgets, QtCore, QtGui, QtMultimedia
except ImportError as pyqt5_error:
try:
from PySide2 import QtWidgets, QtCore, QtGui, QtMultimedia
except ImportError as pyside2_error:
sys.exit(
"This program require a Qt5 library.\n"
"You can install PyQt5 (recommended) :\n"
" pip3 install --user PyQt5\n"
" pip3 install --user qdarkstyle\n"
"or PySide2 :\n"
" pip3 install --user PySide2\n"
+ pyqt5_error.msg
+ "\n"
+ pyside2_error.msg
)
else:
os.environ["QT_API"] = "pyside2"
else:
os.environ["QT_API"] = "pyqt5"
QtCore.Signal = QtCore.pyqtSignal

View File

@ -3,11 +3,11 @@
import random
from qtpy import QtCore, QtGui
from . import consts
from .consts import L, R, U, D, CLOCKWISE, COUNTERCLOCKWISE
from .point import Point
from .qt5 import QtCore, QtGui
class Block: