Permalink
Browse files

fixed color

  • Loading branch information...
1 parent 9660e3a commit 7d74ba5452d8ff67fa64d657bd96067ba7e7a277 Alec Goebel committed Apr 30, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 samplecode/networking_example/coinget/rand.py
@@ -3,12 +3,10 @@
from pygame import Color
def player_color():
- color = [ randrange(128,256) for _ in range(3) ]
-
- num_channels = randint(1,2)
- for i in range(num_channels):
+ color = [ 0, 0, 0 ]
+ for i in range(randrange(1,3)):
channel = randrange(3)
- color[channel] = 0
+ color[channel] = randrange(128,256)
return Color(*color)

0 comments on commit 7d74ba5

Please sign in to comment.