-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconnect_four_driver.py
39 lines (30 loc) · 1008 Bytes
/
connect_four_driver.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
''' CS5001 - Spring 2020
Harshal Shah
Project - Driver File
'''
from connect_four_non_class_functions import game_mode
from connect_four_non_class_functions import choose_board_size
from connect_the_four_classes_computer_v1 import *
from connect_the_four_classes import *
def main():
#Get User Choice (Human vs Human or Human vs Computer)
choice = game_mode()
#Get User Choice (GameBoard Dimensions)
(rows, columns) = choose_board_size()
if choice == 1:
#Human vs Human
game = Game(rows, columns, "red.txt", "yellow.txt", -100, -100)
game.make_board()
game.initialize_score()
game.display_score()
game.display_turn()
game.click_on_arrow()
else:
#Human vs Computer
game = Game_Computer(rows, columns, "red.txt", "computer.txt", -100, -100)
game.make_board()
game.initialize_score()
game.display_score()
game.display_turn()
game.click_on_arrow()
main()