-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstartgames.py
133 lines (108 loc) · 3.8 KB
/
startgames.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import sys
import os
from tkinter import *
window=Tk()
window.title("start Python Games")
window.geometry('550x200')
def runpong():
os.chdir('pong')
os.system('python ./main.py')
os.chdir('..')
def runBerzerk():
os.chdir('Berzerk')
os.system('C:\Python27\python.exe .\pyberzerk.py')
os.chdir('..')
def runpacman():
os.chdir('Pacman')
os.system('python ./run.py')
os.chdir('..')
def runtron():
os.chdir('tron')
os.system('python ./tron.py')
os.chdir('..')
def runflippy():
os.chdir('flippy')
os.system('python ./flippy.py')
os.chdir('..')
def runfourinarow():
os.chdir('fourinarow')
os.system('python ./fourinarow.py')
os.chdir('..')
def rungemgem():
os.chdir('gemgem')
os.system('python ./gemgem.py')
os.chdir('..')
def runmemorypuzzle():
os.chdir('memorypuzzle')
os.system('python ./memorypuzzle.py')
os.chdir('..')
def runmemorypuzzle_obfuscated():
os.chdir('memorypuzzle_obfuscated')
os.system('python ./memorypuzzle_obfuscated.py')
os.chdir('..')
def runpentomino():
os.chdir('pentomino')
os.system('python ./pentomino.py')
os.chdir('..')
def runsimulate():
os.chdir('simulate')
os.system('python ./simulate.py')
os.chdir('..')
def runslidepuzzle():
os.chdir('slidepuzzle')
os.system('python ./slidepuzzle.py')
os.chdir('..')
def runstarpusher():
os.chdir('starpusher')
os.system('python ./starpusher.py')
os.chdir('..')
def runtetris():
os.chdir('tetris')
os.system('python ./tetris.py')
os.chdir('..')
def runtictactoe():
os.chdir('tictactoe')
os.system('python ./tictactoe.py')
os.chdir('..')
def runsnake():
os.system('python ./snake.py')
def runSpaceInvaders():
os.chdir('Space-Invaders')
os.system('python ./Space-Invaders.py')
os.chdir('..')
btn = Button(window, text="flippy", bg="black", fg="white",command=runflippy)
btn.grid(column=0, row=0)
btn = Button(window, text="pacman", bg="black", fg="white",command=runpacman)
btn.grid(column=1, row=0)
btn = Button(window, text="fourinarow", bg="black", fg="white",command=runfourinarow)
btn.grid(column=2, row=0)
btn = Button(window, text="gemgem", bg="black", fg="white",command=rungemgem)
btn.grid(column=3, row=0)
btn = Button(window, text="memorypuzzle", bg="black", fg="white",command=runmemorypuzzle)
btn.grid(column=0, row=5)
btn = Button(window, text="memorypuzzle_obfuscated", bg="black", fg="white",command=runmemorypuzzle_obfuscated)
btn.grid(column=1, row=5)
btn = Button(window, text="pentomino", bg="black", fg="white",command=runpentomino)
btn.grid(column=2, row=5)
btn = Button(window, text="simulate", bg="black", fg="white",command=runsimulate)
btn.grid(column=3, row=5)
btn = Button(window, text="slidepuzzle", bg="black", fg="white",command=runslidepuzzle)
btn.grid(column=0, row=10)
btn = Button(window, text="starpusher", bg="black", fg="white",command=runstarpusher)
btn.grid(column=1, row=10)
btn = Button(window, text="tetris", bg="black", fg="white",command=runtetris)
btn.grid(column=2, row=10)
btn = Button(window, text="tictactoe", bg="black", fg="white",command=runtictactoe)
btn.grid(column=3, row=10)
btn = Button(window, text="snake", bg="black", fg="white",command=runsnake)
btn.grid(column=1, row=20)
btn = Button(window, text="Space-Invaders", bg="black", fg="white",command=runSpaceInvaders)
btn.grid(column=0, row=20)
btn = Button(window, text="Pong", bg="black", fg="white",command
=runpong)
btn.grid(column=2, row=20)
btn = Button(window, text="tron", bg="black", fg="white",command=runtron)
btn.grid(column=3, row=20)
btn = Button(window, text="berzerk", bg="black", fg="white",command=runBerzerk)
btn.grid(column=0, row=30)
window.mainloop()