diff options
Diffstat (limited to 'data/graphics/tree')
-rw-r--r-- | data/graphics/tree | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/data/graphics/tree b/data/graphics/tree index f4cdae7..e01cf8e 100644 --- a/data/graphics/tree +++ b/data/graphics/tree @@ -1,3 +1,4 @@ +# tree
import pippy, pygame, sys
from pygame.locals import *
@@ -7,17 +8,17 @@ import math # always need to init first thing
pygame.init()
-# XO screen is 1200x900
-size = width, height = 1200, 900
-
# create the window and keep track of the surface
# for drawing into
-screen = pygame.display.set_mode(size)
+screen = pygame.display.set_mode()
+
+# ask for screen's width and height
+width, height = screen.get_size()
# turn off the cursor
pygame.mouse.set_visible(False)
-color = (250,250,250)
+color = (250, 250, 250)
min_factor = 0.8
max_factor = 0.9
start_length = 130
@@ -61,7 +62,7 @@ draw_tree((width / 2), height - 20, start_length, 0) pygame.display.flip()
while pippy.pygame.next_frame():
- # chill until a key is pressed
+ # chill until escape key is pressed
for event in pygame.event.get():
if event.type == QUIT:
sys.exit()
|