-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
30 lines (25 loc) · 851 Bytes
/
main.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
import gameoflife
if __name__ == '__main__':
# You should not modify this part.
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--width',
default='60',
help='input the width of the map')
parser.add_argument('--height',
default='23',
help='input the height of the map')
parser.add_argument('--pattern',
default='1',
help='input pattern')
parser.add_argument('--generation',
default='1',
help='input generation')
args = parser.parse_args()
w = int(args.width)
h = int(args.height)
p = int(args.pattern)
t = int(args.generation)
i=gameoflife.GameofLife(w,h)
i.initialize(p)
i.proceed(t)