예제 #1
0
def main():
    root = Tk()
    StartMenu(root)
    root.mainloop()
    window = Tk()
    Graphic(window)
    window.mainloop()
    result = Tk()
    Result(result)
    result.mainloop()
예제 #2
0
def main():
    #global MainGame
    # Create the menu object. Set it up and run in
    # Might implement the setup inside the run function later
    Menu = StartMenu.StartMenu()
    Menu.setup()
    Run_Game = Menu.run()
    # If the menu returns a true for the run button being pressed then run the simulator
    if Run_Game:
        #MyGame.Game.init(1920, 1080, True)
        # Create the MyGame object with global constants setup by the start menu and run it
        MainGame = MyGame.Game(GC.ScreenWidth, GC.ScreenHeight, GC.FullScreen)
        MainGame.Game_Loop()
예제 #3
0
import CheckSign
import IfWin
from os import system

#Zadeklarowanie tablicy tablic, która ma puste miejsca do rysowania pierwszej pustej planszy
boardSpace = [[' ', ' ', ' '], [' ', ' ', ' '], [' ', ' ', ' ']]

#Zadeklarowanie zmiennych
player1 = "X"  #Zmienna przechowywująca znak pierwszego gracza
player2 = ""  #Zmienna przechowywująca znak drugiego gracza
computer = ""  #Zmienna przechowywująca znak komputera
youTurn = False  #Zmienna przechowywująca turę gracza
a = 0  #Zmienna wprowadzania wyboru przez gracza

#Menu startowe. Wybór graczy do gry
StartMenu.StartMenu()

#Walidacja wprowadzanej wartośni
while a != 1 and a != 2:
    try:
        a = int(input("Zdecyduj:"))
    except:
        a = 0

#Przypisanie drugiego gracza do rozgrywki
if a == 1:
    computer = "O"
else:
    player2 = "O"

#Przypisywanie zaczynającego gracza