Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed color

  • Loading branch information...
commit 7d74ba5452d8ff67fa64d657bd96067ba7e7a277 1 parent 9660e3a
@alecgoebel alecgoebel authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 samplecode/networking_example/coinget/rand.py
View
8 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)
Please sign in to comment.
Something went wrong with that request. Please try again.