Skip to content

Commit

Permalink
better default values
Browse files Browse the repository at this point in the history
  • Loading branch information
csaez committed Feb 11, 2014
1 parent 9687713 commit 705ebab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions flascii_bird.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def get_tube():


def mainloop():
global space, bird_vel, bird_pos, tubes, SCORE, tube_gap, TERMINAL_SIZE
global KEY_STRENGHT, TERMINAL_SIZE, SCORE
global space, bird_vel, bird_pos, tubes, tube_gap

t = 0
while True:
# draw background
Expand All @@ -79,7 +81,7 @@ def mainloop():

# draw bird
# calc bird position
f = [0, -2.5] if space else [0, 0]
f = [0, -KEY_STRENGHT] if space else [0, 0]
space = False
for i in range(2):
bird_vel[i] += GRAVITY[i]
Expand Down Expand Up @@ -130,6 +132,7 @@ def mainloop():
SCORE = 0
STEP = 0.1
GRAVITY = (0, 0.2)
KEY_STRENGHT = 2.2
TERMINAL_SIZE = (80, 25)

# assets
Expand Down

0 comments on commit 705ebab

Please sign in to comment.