Browse Source

tweak tetris colors

Thomas Buck 1 year ago
parent
commit
ee729abab0
1 changed files with 10 additions and 8 deletions
  1. 10
    8
      tetris.py

+ 10
- 8
tetris.py View File

31
         self.colors = [
31
         self.colors = [
32
             (251, 72, 196), # camp23 pink
32
             (251, 72, 196), # camp23 pink
33
             (63, 255, 33), # camp23 green
33
             (63, 255, 33), # camp23 green
34
-            (255, 0, 0),
35
-            #(0, 255, 0),
36
-            (0, 0, 255),
37
-            (255, 255, 0),
38
-            (0, 255, 255),
39
-            (255, 0, 255),
34
+            (255, 0, 0), # red
35
+            #(0, 255, 0), # green
36
+            (0, 0, 255), # blue
37
+            (255, 255, 0), # yellow
38
+            (0, 255, 255), # cyan
39
+            #(255, 0, 255),
40
             #(255, 255, 255),
40
             #(255, 255, 255),
41
+            (255, 127, 0), # orange
42
+            (127, 127, 127), # grey
41
         ]
43
         ]
42
 
44
 
43
         DrawText = util.getTextDrawer()
45
         DrawText = util.getTextDrawer()
415
         # draw play area and border
417
         # draw play area and border
416
         for x in range(-1, self.width + 1):
418
         for x in range(-1, self.width + 1):
417
             for y in range(-1, self.height + 1):
419
             for y in range(-1, self.height + 1):
418
-                c = self.colors[1] # border color
420
+                c = self.colors[7] # border color
419
                 if (x >= 0) and (y >= 0) and (x < self.width) and (y < self.height):
421
                 if (x >= 0) and (y >= 0) and (x < self.width) and (y < self.height):
420
                     c = self.data[x][y]
422
                     c = self.data[x][y]
421
 
423
 
430
         # draw next piece and border
432
         # draw next piece and border
431
         for x in range(-1, self.max_width + 1):
433
         for x in range(-1, self.max_width + 1):
432
             for y in range(-1, self.max_height + 1):
434
             for y in range(-1, self.max_height + 1):
433
-                c = self.colors[0] # border color
435
+                c = self.colors[7] # border color
434
                 if (x >= 0) and (y >= 0) and (x < self.max_width) and (y < self.max_height):
436
                 if (x >= 0) and (y >= 0) and (x < self.max_width) and (y < self.max_height):
435
                     if self.next_piece == None:
437
                     if self.next_piece == None:
436
                         c = (0, 0, 0)
438
                         c = (0, 0, 0)

Loading…
Cancel
Save