Skip to content
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.

Commit

Permalink
Summer
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeykolosov committed Sep 17, 2018
1 parent cf125fc commit b8b6f04
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions main.py → team_8/main.py
@@ -1,4 +1,5 @@
from random import randint
from colorsys import hls_to_rgb
from random import randint, choice, random
from itertools import cycle

WIDTH = 800
Expand All @@ -12,6 +13,13 @@ class Colours:
BLACK = (0, 0, 0)
AUTUMN = (204, 153, 0)
BROWN = (102, 78, 0)
BROWN_2 = (99, 95, 0)
BROWN_3 = (132, 100, 0)
BROWNS = [
BROWN,
BROWN_2,
BROWN_3,
]


class Particle:
Expand All @@ -37,7 +45,18 @@ def random(cls, colour=Colours.WHITE):
)


LEAVES = [Particle.random(colour=Colours.BROWN) for i in range(30)]
def flower_colour():
return choice([
'red', 'green', 'blue', 'yellow', 'orange',
])

inputs = (random(), 0.5, 0.1)
value = tuple([int(255 * c) for c in hls_to_rgb(*inputs)])
return value


LEAVES = [Particle.random(colour=choice(Colours.BROWNS)) for i in range(30)]
FLOWERS = [Particle.random(colour=flower_colour()) for i in range(500)]


class Season:
Expand Down Expand Up @@ -71,7 +90,8 @@ def draw_spring():


def draw_summer():
pass
for flower in FLOWERS:
flower.draw()


def draw_autumn():
Expand Down

0 comments on commit b8b6f04

Please sign in to comment.