@RYANMALDONADO/

Connect-4 BETA

Python

A fun Connect-4 game with AI.

fork
loading
Files
  • main.py
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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
# Imports

import time
from termcolor import colored
import replit
from random import randrange

# Variables

placeOneFilled = False
placeTwoFilled = False
placeThreeFilled = False
placeFourFilled = False
placeFiveFilled = False
placeSixFilled = False
placeSevenFilled = False
placeEightFilled = False
placeNineFilled = False
placeTenFilled = False
placeElevenFilled = False
placeTwelveFilled = False
placeThirteenFilled = False
placeFourteenFilled = False
placeFifteenFilled = False
placeSixteenFilled = False
placeSeventeenFilled = False
placeEighteenFilled = False
placeNineteenFilled = False
placeTwentyFilled = False
placeTwentyOneFilled = False
placeTwentyTwoFilled = False
placeTwentyThreeFilled = False
placeTwentyFourFilled = False
placeTwentyFiveFilled = False
placeTwentySixFilled = False
placeTwentySevenFilled = False
placeTwentyEightFilled = False
placeTwentyNineFilled = False
placeThirtyFilled = False
placeThirtyOneFilled = False
placeThirtyTwoFilled = False
placeThirtyThreeFilled = False
placeThirtyFourFilled = False
placeThirtyFiveFilled = False
placeThirtySixFilled = False
placeThirtySevenFilled = False
placeThirtyEightFilled = False
placeThirtyNineFilled = False
placeFortyFilled = False
placeFortyOneFilled = False
placeFortyTwoFilled = False
playerSetOne = False
playerSetTwo = False
playerSetThree = False
playerSetFour = False
playerSetFive = False
playerSetSix = False
playerSetSeven = False
playerSetEight = False
playerSetNine = False
playerSetTen = False
playerSetEleven = False
playerSetTwelve = False
playerSetThirteen = False
playerSetFourteen = False
playerSetFifteen = False
playerSetSixteen = False
playerSetSeventeen = False
playerSetEighteen = False
playerSetNineteen = False
playerSetTwenty = False
playerSetTwentyOne = False
playerSetTwentyTwo = False
playerSetTwentyThree = False
playerSetTwentyFour = False
playerSetTwentyFive = False
playerSetTwentySix = False
playerSetTwentySeven = False
playerSetTwentyEight = False
playerSetTwentyNine = False
playerSetThirty = False
playerSetThirtyOne = False
playerSetThirtyTwo = False
playerSetThirtyThree = False
playerSetThirtyFour = False
playerSetThirtyFive = False
playerSetThirtySix = False
playerSetThirtySeven = False
playerSetThirtyEight = False
playerSetThirtyNine = False
playerSetForty = False
playerSetFortyOne = False
playerSetFortyTwo = False
placeOneValue = " "
placeTwoValue = " "
placeThreeValue = " "
placeFourValue = " "
placeFiveValue = " "
placeSixValue = " "
placeSevenValue = " "
placeEightValue = " "
placeNineValue = " "
placeTenValue = " "
placeElevenValue = " "
placeTwelveValue = " "
placeThirteenValue = " "
placeFourteenValue = " "
placeFifteenValue = " "
placeSixteenValue = " "
placeSeventeenValue = " "
placeEighteenValue = " "
placeNineteenValue = " "
placeTwentyValue = " "
placeTwentyOneValue = " "
placeTwentyTwoValue = " "
placeTwentyThreeValue = " "
placeTwentyFourValue = " "
placeTwentyFiveValue = " "
placeTwentySixValue = " "
placeTwentySevenValue = " "
placeTwentyEightValue = " "
placeTwentyNineValue = " "
placeThirtyValue = " "
placeThirtyOneValue = " "
placeThirtyTwoValue = " "
placeThirtyThreeValue = " "
placeThirtyFourValue = " "
placeThirtyFiveValue = " "
placeThirtySixValue = " "
placeThirtySevenValue = " "
placeThirtyEightValue = " "
placeThirtyNineValue = " "
placeFortyValue = " "
placeFortyOneValue = " "
placeFortyTwoValue = " "
colorValueOne = "red"
colorValueTwo = "red"
colorValueThree = "red"
colorValueFour = "red"
colorValueFive = "red"
colorValueSix = "red"
colorValueSeven = "red"
colorValueEight = "red"
colorValueNine = "red"
colorValueTen = "red"
colorValueEleven = "red"
colorValueTwelve = "red"
colorValueThirteen = "red"
colorValueFourteen = "red"
colorValueFifteen = "red"
colorValueSixteen = "red"
colorValueSeventeen = "red"
colorValueEighteen = "red"
colorValueNineteen = "red"
colorValueTwenty = "red"
colorValueTwentyOne = "red"
colorValueTwentyTwo = "red"
colorValueTwentyThree = "red"
colorValueTwentyFour = "red"
colorValueTwentyFive = "red"
colorValueTwentySix = "red"
colorValueTwentySeven = "red"
colorValueTwentyEight = "red"
colorValueTwentyNine = "red"
colorValueThirty = "red"
colorValueThirtyOne = "red"
colorValueThirtyTwo = "red"
colorValueThirtyThree = "red"
colorValueThirtyFour = "red"
colorValueThirtyFive = "red"
colorValueThirtySix = "red"
colorValueThirtySeven = "red"
colorValueThirtyEight = "red"
colorValueThirtyNine = "red"
colorValueForty = "red"
colorValueFortyOne = "red"
colorValueFortyTwo = "red"
turn = False
setColor = ""
setCorrectColor = False

# Draw board function

def drawBoard():
  replit.clear()
  print(colored("   1     2     3     4     5     6     7 ", setColor))
  print(colored("___________________________________________", "yellow"))
  print(colored("| ", "yellow"), colored(placeOneValue, colorValueOne), colored(" | ", "yellow"), colored(placeTwoValue, colorValueTwo), colored(" | ", "yellow"), colored(placeThreeValue, colorValueThree), colored(" | ", "yellow"), colored(placeFourValue, colorValueFour), colored(" | ", "yellow"), colored(placeFiveValue, colorValueFive), colored(" | ", "yellow"), colored(placeSixValue, colorValueSix), colored(" | ", "yellow"), colored(placeSevenValue, colorValueSeven), colored(" |", "yellow"))
  print(colored("|—————|—————|—————|—————|—————|—————|—————|", "yellow"))
  print(colored("| ", "yellow"), colored(placeEightValue, colorValueEight), colored(" | ", "yellow"), colored(placeNineValue, colorValueNine), colored(" | ", "yellow"), colored(placeTenValue, colorValueTen), colored(" | ", "yellow"), colored(placeElevenValue, colorValueEleven), colored(" | ", "yellow"), colored(placeTwelveValue, colorValueTwelve), colored(" | ", "yellow"), colored(placeThirteenValue, colorValueThirteen), colored(" | ", "yellow"), colored(placeFourteenValue, colorValueFourteen), colored(" |", "yellow"))
  print(colored("|—————|—————|—————|—————|—————|—————|—————|", "yellow"))
  print(colored("| ", "yellow"), colored(placeFifteenValue, colorValueFifteen), colored(" | ", "yellow"), colored(placeSixteenValue, colorValueSixteen), colored(" | ", "yellow"), colored(placeSeventeenValue, colorValueSeventeen), colored(" | ", "yellow"), colored(placeEighteenValue, colorValueEighteen), colored(" | ", "yellow"), colored(placeNineteenValue, colorValueNineteen), colored(" | ", "yellow"), colored(placeTwentyValue, colorValueTwenty), colored(" | ", "yellow"), colored(placeTwentyOneValue, colorValueTwentyOne), colored(" |", "yellow"))
  print(colored("|—————|—————|—————|—————|—————|—————|—————|", "yellow"))
  print(colored("| ", "yellow"), colored(placeTwentyTwoValue, colorValueTwentyTwo), colored(" | ", "yellow"), colored(placeTwentyThreeValue, colorValueTwentyThree), colored(" | ", "yellow"), colored(placeTwentyFourValue, colorValueTwentyFour), colored(" | ", "yellow"), colored(placeTwentyFiveValue, colorValueTwentyFive), colored(" | ", "yellow"), colored(placeTwentySixValue, colorValueTwentySix), colored(" | ", "yellow"), colored(placeTwentySevenValue, colorValueTwentySeven), colored(" | ", "yellow"), colored(placeTwentyEightValue, colorValueTwentyEight), colored(" |", "yellow"))
  print(colored("|—————|—————|—————|—————|—————|—————|—————|", "yellow"))
  print(colored("| ", "yellow"), colored(placeTwentyNineValue, colorValueTwentyNine), colored(" | ", "yellow"), colored(placeThirtyValue, colorValueThirty), colored(" | ", "yellow"), colored(placeThirtyOneValue, colorValueThirtyOne), colored(" | ", "yellow"), colored(placeThirtyTwoValue, colorValueThirtyTwo), colored(" | ", "yellow"), colored(placeThirtyThreeValue, colorValueThirtyThree), colored(" | ", "yellow"), colored(placeThirtyFourValue, colorValueThirtyFour), colored(" | ", "yellow"), colored(placeThirtyFiveValue, colorValueThirtyFive), colored(" |", "yellow"))
  print(colored("|—————|—————|—————|—————|—————|—————|—————|", "yellow"))
  print(colored("| ", "yellow"), colored(placeThirtySixValue, colorValueThirtySix), colored(" | ", "yellow"), colored(placeThirtySevenValue, colorValueThirtySeven), colored(" | ", "yellow"), colored(placeThirtyEightValue, colorValueThirtyEight), colored(" | ", "yellow"), colored(placeThirtyNineValue, colorValueThirtyNine), colored(" | ", "yellow"), colored(placeFortyValue, colorValueForty), colored(" | ", "yellow"), colored(placeFortyOneValue, colorValueFortyOne), colored(" | ", "yellow"), colored(placeFortyTwoValue, colorValueFortyTwo), colored(" |", "yellow"))
  print(colored("‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾", "yellow"))
  
# Timer

timer = randrange(2, 5)

# Welcome

replit.clear()
print("Welcome to Connect-4!")
time.sleep(0.5)
print()
print("This Connect-4 game was created by Camden Mac Leod.")
time.sleep(0.5)
print()
print(colored("This program was created in Python because it allows me to use "), colored("c", "magenta"), colored("o", "cyan"), colored("l", "green"), colored("o", "red"), colored("r", "yellow"), colored(". Python also helps to reduce code."))
time.sleep(0.5)
print()
print("This program is off the charts when it comes to lines of code. It reaches a staggering 466 lines of code.")
time.sleep(0.5)
print()
print("Just so you know, you have to wait for the game to begin and for text to display because the program uses sleep timers implemented to reduce lag.")
time.sleep(0.5)
print()
print("I made this program for you, please enjoy yourself!")
print()
time.sleep(0.5)
print("——————————————————————————————————————————————————")
time.sleep(0.5)
print()

# Start

startInput = input("Please type 'PvP' (for 2-player) or 'Regular' (for playing against the computer) >").lower()
while setCorrectColor == False:
  print()
  setColor = input("What color would you like to play as? (green, magenta, cyan, blue, white, or grey) >").lower()
  if setColor == "green" or setColor == "yellow" or setColor == "magenta" or setColor == "blue" or setColor == "grey" or setColor == "cyan" or setColor == "white":
    print()
    print(colored("Thank you for selecting a color. Your pieces will be this color", setColor))
    setCorrectColor = True
  else:
    print()
    print(colored("You did not enter a valid color (don't forget that grey cannot be spelled gray).", "red"))
if startInput == "regular" or startInput == "r" or startInput == "reglar" or startInput == "" or startInput == "reglura" or startInput == "2":
  print()
  difficulty = input(colored("Please select a difficulty (Easy, Medium, or Hard) >", setColor)).lower()
  if difficulty == "hard" or difficulty == "h" or difficulty == "" or difficulty == "hrd" or difficulty == "ard":
    replit.clear()
    print(colored("Starting program...", "yellow"))
    time.sleep(timer)
    print(colored("Please wait a few seconds so that the program can run at full speed...", "yellow"))
    time.sleep(timer)
    drawBoard()
    turn = False
    while turn == False:
      print()
      move = int(input(colored("Please type in an available number that is seen above >", setColor)))
      if move == 1 or move == 2 or move == 3 or move == 4 or move == 5 or move == 6 or move == 7:
        if move == 1 and placeThirtySixFilled == False:
          if placeThirtySixFilled == False:
            placeThirtySixValue = "O"
            placeThirtySixFilled = True
            colorValueThirtySix = setColor
            playerSetThirtySix = True
            turn = True
          elif placeThirtySixFilled == True and placeTwentyNineFilled == False:
            placeTwentyNineValue = "O"
            placeTwentyNineFilled = True
            colorValueTwentyNine = setColor
            playerSetTwentyNine = True
            turn = True
          elif placeTwentyNineFilled == True and placeTwentyTwoFilled == False:
            placeTwentyTwoValue = "O"
            placeTwentyTwoFilled = True
            colorValueTwentyTwo = setColor
            playerSetTwentyTwo = True
            turn = True
          elif placeTwentyTwoFilled == True and placeFifteenFilled == False:
            placeFifteenValue = "O"
            placeFifteenFilled = True
            colorValueFifteen = setColor
            playerSetFifteen = True
            turn = True
          elif placeFifteenFilled == True and placeEightFilled == False:
            placeEightValue = "O"
            placeEightFilled = True
            colorValueEight = setColor
            playerSetEight = True
            turn = True
          elif placeEightFilled == True and placeOneFilled == False:
            placeOneValue = "O"
            placeOneFilled = True
            colorValueOne = setColor
            playerSetOne = True
            turn = True
        elif move == 2 and placeThirtySevenFilled == False:
          if placeThirtySevenFilled == False:
            placeThirtySevenValue = "O"
            placeThirtySevenFilled = True
            colorValueThirtySeven = setColor
            playerSetThirtySeven = True
            turn = True
          elif placeThirtySevenFilled == True and placeThirtyFilled == False:
            placeThirtyValue = "O"
            placeThirtyFilled = True
            colorValueThirty = setColor
            playerSetThirty = True
            turn = True
          elif placeThirtyFilled == True and placeTwentyThreeFilled == False:
            placeTwentyThreeValue = "O"
            placeTwentyThreeFilled = True
            colorValueTwentyThree = setColor
            playerSetTwentyThree = True
            turn = True
          elif placeTwentyThreeFilled == True and placeSixteenFilled == False:
            placeSixteenValue = "O"
            placeSixteenFilled = True
            colorValueSixteen = setColor
            playerSetSixteen = True
            turn = True
          elif placeSixteenFilled == True and placeNineFilled == False:
            placeNineValue = "O"
            placeNineFilled = True
            colorValueNine = setColor
            playerSetNine = True
            turn = True
          elif placeNineFilled == True and placeTwoFilled == False:
            placeTwoValue = "O"
            placeTwoFilled = True
            colorValueTwo = setColor
            playerSetTwo = True
            turn = True
        elif move == 3 and placeThirtyEightFilled == False:
          if placeThirtyEightFilled == False:
            placeThirtyEightValue = "O"
            placeThirtyEightFilled = True
            colorValueThirtyEight = setColor
            playerSetThirtyEight = True
            turn = True
          elif placeThirtyEightFilled == True and placeThirtyOneFilled == False:
            placeThirtyOneValue = "O"
            placeThirtyOneFilled = True
            colorValueThirtyOne = setColor
            playerSetThirtyOne = True
            turn = True
          elif placeThirtyOneFilled == True and placeTwentyFourFilled == False:
            placeTwentyFourValue = "O"
            placeTwentyFourFilled = True
            colorValueTwentyFour = setColor
            playerSetTwentyFour = True
            turn = True
          elif placeTwentyFourFilled == True and placeSeventeenFilled == False:
            placeSeventeenValue = "O"
            placeSeventeenFilled = True
            colorValueSeventeen = setColor
            playerSetSeventeen = True
            turn = True
          elif placeSeventeenFilled == True and placeTenFilled == False:
            placeTenValue = "O"
            placeTenFilled = True
            colorValueTen = setColor
            playerSetTen = True
            turn = True
          elif placeElevenFilled == True and placeThreeFilled == False:
            placeThreeValue = "O"
            placeThreeFilled = True
            colorValueThree = setColor
            playerSetThree = True
            turn = True
        elif move == 4 and placeThirtyNineFilled == False:
          if placeThirtyNineFilled == False:
            placeThirtyNineValue = "O"
            placeThirtyNineFilled = True
            colorValueThirtyNine = setColor
            playerSetThirtyNine = True
            turn = True
          elif placeThirtyNineFilled == True and placeThirtyTwoFilled == False:
            placeThirtyTwoValue = "O"
            placeThirtyTwoFilled = True
            colorValueThirtyTwo = setColor
            playerSetThirtyTwo = True
            turn = True
          elif placeThirtyTwoFilled == True and placeTwentyFiveFilled == False:
            placeTwentyFiveValue = "O"
            placeTwentyFiveFilled = True
            colorValueTwentyFive = setColor
            playerSetTwentyFive = True
            turn = True
          elif placeTwentyFiveFilled == True and placeEighteenFilled == False:
            placeEighteenValue = "O"
            placeEighteenFilled = True
            colorValueEighteen = setColor
            playerSetEighteen = True
            turn = True
          elif placeEighteenFilled == True and placeElevenFilled == False:
            placeElevenValue = "O"
            placeElevenFilled = True
            colorValueEleven = setColor
            playerSetEleven = True
            turn = True
          elif placeElevenFilled == True and placeFourFilled == False:
            placeFourValue = "O"
            placeFourFilled = True
            colorValueFour = setColor
            playerSetFour = True
            turn = True
        elif move == 5 and placeFortyFilled == False:
          if placeFortyFilled == False:
            placeFortyValue = "O"
            placeFortyFilled = True
            colorValueForty = setColor
            playerSetForty = True
            turn = True
          elif placeFortyFilled == True and placeThirtyThreeFilled == False:
            placeThirtyThreeValue = "O"
            placeThirtyThreeFilled = True
            colorValueThirtyThree = setColor
            playerSetThirtyThree = True
            turn = True
          elif placeThirtyThreeFilled == True and placeTwentySixFilled == False:
            placeTwentySixValue = "O"
            placeTwentySixFilled = True
            colorValueTwentySix = setColor
            playerSetTwentySix = True
            turn = True
          elif placeTwentySixFilled == True and placeNineteenFilled == False:
            placeNineteenValue = "O"
            placeNineteenFilled = True
            colorValueNineteen = setColor
            playerSetNineteen = True
            turn = True
          elif placeNineteenFilled == True and placeTwelveFilled == False:
            placeTwelveValue = "O"
            placeTwelveFilled = True
            colorValueTwelve = setColor
            playerSetTwelve = True
            turn = True
          elif placeTwelveFilled == True and placeFiveFilled == False:
            placeFiveValue = "O"
            placeFiveFilled = True
            colorValueFive = setColor
            playerSetFive = True
            turn = True
        elif move == 6 and placeFortyOneFilled == False:
          if placeFortyOneFilled == False:
            placeFortyOneValue = "O"
            placeFortyOneFilled = True
            colorValueFortyOne = setColor
            playerSetFortyOne = True
            turn = True
          elif placeFortyOneFilled == True and placeThirtyFourFilled == False:
            placeThirtyFourValue = "O"
            placeThirtyFourFilled = True
            colorValueThirtyFour = setColor
            playerSetThirtyFour = True
            turn = True
          elif placeThirtyFourFilled == True and placeTwentySevenFilled == False:
            placeTwentySevenValue = "O"
            placeTwentySevenFilled = True
            colorValueTwentySeven = setColor
            playerSetTwentySeven = True
            turn = True
          elif placeTwentySevenFilled == True and placeTwentyFilled == False:
            placeTwentyValue = "O"
            placeTwentyFilled = True
            colorValueTwenty = setColor
            playerSetTwenty = True
            turn = True
          elif placeTwentyFilled == True and placeThirteenFilled == False:
            placeThirteenValue = "O"
            placeThirteenFilled = True
            colorValueThirteen = setColor
            playerSetThirteen = True
            turn = True
          elif placeThirteenFilled == True and placeSixFilled == False:
            placeSixValue = "O"
            placeSixFilled = True
            colorValueSix = setColor
            playerSetSix = True
            turn = True
        elif move == 7 and placeFortyTwoFilled == False:
          if placeFortyTwoFilled == False:
            placeFortyTwoValue = "O"
            placeFortyTwoFilled = True
            colorValueFortyTwo = setColor
            playerSetFortyTwo = True
            turn = True
          elif placeFortyTwoFilled == True and placeThirtyFiveFilled == False:
            placeThirtyFiveValue = "O"
            placeThirtyFiveFilled = True
            colorValueThirtyFive = setColor
            playerSetThirtyFive = True
            turn = True
          elif placeThirtyFiveFilled == True and placeTwentyEightFilled == False:
            placeTwentyEightValue = "O"
            placeTwentyEightFilled = True
            colorValueTwentyEight = setColor
            playerSetTwentyEight = True
            turn = True
          elif placeTwentyEightFilled == True and placeTwentyOneFilled == False:
            placeTwentyOneValue = "O"
            placeTwentyOneFilled = True
            colorValueTwentyOne = setColor
            playerSetTwentyOne = True
            turn = True
          elif placeTwentyOneFilled == True and placeFourteenFilled == False:
            placeFourteenValue = "O"
            placeFourteenFilled = True
            colorValueFourteen = setColor
            playerSetFourteen = True
            turn = True
          elif placeFourteenFilled == True and placeSevenFilled == False:
            placeSevenValue = "O"
            placeSevenFilled = True
            colorValueSeven = setColor
            playerSetSeven = True
            turn = True
        else:
          print()
          print(colored("You cannot play in that column anymore. It has already been filled.", "red"))
      else:
        print(colored("You did not type in a valid number (1-7), please try again >", "red"))
    replit.clear()
    drawBoard()
    print()
    print(colored("The Computer is deciding where to play...", setColor))
    time.sleep(timer)
    
    drawBoard()
if startInput == "board":
  placeOneValue = "1"
  placeTwoValue = "2"
  placeThreeValue = "3"
  placeFourValue = "4"
  placeFiveValue = "5"
  placeSixValue = "6"
  placeSevenValue = "7"
  placeEightValue = "8"
  placeNineValue = "9"
  placeTenValue = "10"
  placeElevenValue = "11"
  placeTwelveValue = "12"
  placeThirteenValue = "13"
  placeFourteenValue = "14"
  placeFifteenValue = "15"
  placeSixteenValue = "16"
  placeSeventeenValue = "17"
  placeEighteenValue = "18"
  placeNineteenValue = "19"
  placeTwentyValue = "20"
  placeTwentyOneValue = "21"
  placeTwentyTwoValue = "22"
  placeTwentyThreeValue = "23"
  placeTwentyFourValue = "24"
  placeTwentyFiveValue = "25"
  placeTwentySixValue = "26"
  placeTwentySevenValue = "27"
  placeTwentyEightValue = "28"
  placeTwentyNineValue = "29"
  placeThirtyValue = "30"
  placeThirtyOneValue = "31"
  placeThirtyTwoValue = "32"
  placeThirtyThreeValue = "33"
  placeThirtyFourValue = "34"
  placeThirtyFiveValue = "35"
  placeThirtySixValue = "36"
  placeThirtySevenValue = "37"
  placeThirtyEightValue = "38"
  placeThirtyNineValue = "39"
  placeFortyValue = "40"
  placeFortyOneValue = "41"
  placeFortyTwoValue = "42"
  drawBoard()