# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'start_window.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets
# from level_page import Ui_Level_Window
# from game_page import Ui_Game_Window
import showings

class Ui_Start_Window(object):
    def setupUi(self, Start_Window):
        self.Start_Window=Start_Window
        Start_Window.setObjectName("Start_Window")
        Start_Window.resize(882, 568)
        Start_Window.setMaximumSize(QtCore.QSize(882, 568))
        Start_Window.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("Mancala-fun-entertainment-game-512.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        Start_Window.setWindowIcon(icon)
        Start_Window.setStyleSheet("background:#30475e    ;\n"
"border-radius:12px;")
        self.centralwidget = QtWidgets.QWidget(Start_Window)
        self.centralwidget.setObjectName("centralwidget")
        self.lbl_title = QtWidgets.QLabel(self.centralwidget)
        self.lbl_title.setGeometry(QtCore.QRect(400, 60, 321, 101))
        font = QtGui.QFont()
        font.setFamily("Neo Tech Alt")
        font.setPointSize(36)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        font.setStrikeOut(False)
        self.lbl_title.setFont(font)
        self.lbl_title.setStyleSheet("color:#222831;\n"
"")
        self.lbl_title.setObjectName("lbl_title")
        self.btn_one = QtWidgets.QPushButton(self.centralwidget)
        self.btn_one.setGeometry(QtCore.QRect(220, 200, 281, 81))
        self.btn_one.setStyleSheet("font: 20pt \\\"MV Boli\\\";\n"
"background:#f5e6ca;\n"
"color:#222831;\n"
"border-radius:12px;")
        self.btn_one.setObjectName("btn_one")
        self.btn_two = QtWidgets.QPushButton(self.centralwidget)
        self.btn_two.setGeometry(QtCore.QRect(220, 310, 281, 81))
        self.btn_two.setStyleSheet("font: 20pt \\\"MV Boli\\\";\n"
"background:#f5e6ca;\n"
"color:#222831;\n"
"border-radius:12px;")
        self.btn_two.setObjectName("btn_two")
        self.btn_zero = QtWidgets.QPushButton(self.centralwidget)
        self.btn_zero.setGeometry(QtCore.QRect(220, 420, 281, 81))
        self.btn_zero.setStyleSheet("font: 20pt \\\"MV Boli\\\";\n"
"background:#f5e6ca;\n"
"color:#222831;\n"
"border-radius:12px;")
        self.btn_zero.setObjectName("btn_zero")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(180, -10, 301, 241))
        self.label.setObjectName("label")
        self.radioButton_stealing = QtWidgets.QRadioButton(self.centralwidget)
        self.radioButton_stealing.setGeometry(QtCore.QRect(570, 250, 171, 61))
        self.radioButton_stealing.setStyleSheet("font: 20pt \\\"MV Boli\\\";\n"
"color:#222831;\n"
"border-radius:12px;")
        self.radioButton_stealing.setChecked(True)
        self.radioButton_stealing.setObjectName("radioButton_stealing")
        self.radioButton_no_stealing = QtWidgets.QRadioButton(self.centralwidget)
        self.radioButton_no_stealing.setGeometry(QtCore.QRect(570, 340, 211, 61))
        self.radioButton_no_stealing.setStyleSheet("font: 20pt \\\"MV Boli\\\";\n"
"color:#222831;\n"
"border-radius:12px;")
        self.radioButton_no_stealing.setObjectName("radioButton_no_stealing")
        self.label.raise_()
        self.lbl_title.raise_()
        self.btn_one.raise_()
        self.btn_two.raise_()
        self.btn_zero.raise_()
        self.radioButton_stealing.raise_()
        self.radioButton_no_stealing.raise_()
        Start_Window.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(Start_Window)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 882, 26))
        self.menubar.setObjectName("menubar")
        Start_Window.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(Start_Window)
        self.statusbar.setObjectName("statusbar")
        Start_Window.setStatusBar(self.statusbar)

        self.retranslateUi(Start_Window)
        QtCore.QMetaObject.connectSlotsByName(Start_Window)

        ###
        self.btn_one.clicked.connect(lambda : self.btn_click(1))
        self.btn_two.clicked.connect(lambda : self.btn_click(2))
        self.btn_zero.clicked.connect(lambda : self.btn_click(0))

    def retranslateUi(self, Start_Window):
        _translate = QtCore.QCoreApplication.translate
        Start_Window.setWindowTitle(_translate("Start_Window", "Mancala"))
        self.lbl_title.setText(_translate("Start_Window", "MANCALA"))
        self.btn_one.setText(_translate("Start_Window", "One Player"))
        self.btn_two.setText(_translate("Start_Window", "Two Players"))
        self.btn_zero.setText(_translate("Start_Window", "Watch and Learn"))
        self.label.setText(_translate("Start_Window", "<html><head/><body><p><img src=\"3312354-200.png\"/></p></body></html>"))
        self.radioButton_stealing.setText(_translate("Start_Window", "Stealing"))
        self.radioButton_no_stealing.setText(_translate("Start_Window", "No Stealing"))

    def btn_click(self,no):
        self.no = no
        
        # get stealing
        if self.radioButton_stealing.isChecked():
                s= True
        elif self.radioButton_no_stealing.isChecked():
                s= False

        #######

        if self.no == 1: # one player
                self.Start_Window.close()
                self.new_window, self.ui=showings.show_level_page(self.no,s)
        else: # two players or zero players
                self.Start_Window.close()
                self.new_window2, self.ui2=showings.show_game_page(self.no,s)


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Start_Window = QtWidgets.QMainWindow()
    ui = Ui_Start_Window()
    ui.setupUi(Start_Window)
    Start_Window.show()
    sys.exit(app.exec_())
