Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
Fix premature showing and hiding of hurdles
Browse files Browse the repository at this point in the history
  • Loading branch information
wzykubek committed Jul 21, 2020
1 parent cfe2697 commit 048db05
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ByteBird/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env python3

import os
import sys

if __name__ == '__main__':
sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from ByteBird.game import main
main()
4 changes: 2 additions & 2 deletions ByteBird/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ def main():

draw_hero(ctx.hero_position) # Restore hero on previous position.

if i > 4:
if i >= 4:
draw_hurdles(ctx.hurdles[1], i - 3)
if i == ctx.hero_index:
if not (draw_hero(ctx.hero_position, ctx.hurdles[0])):
break

if ctx.points > 0:
if i < 3:
if i < 4:
if (ctx.hero_index - 1) + i == ctx.hero_index:
if not (draw_hero(ctx.hero_position, ctx.hurdles[0])):
break
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def read(filename):

setup(
name="7seg-ByteBird",
version="0.1.1",
version="0.2",
author="samedamci",
author_email="samedamci@disroot.org",
description=(
Expand Down

0 comments on commit 048db05

Please sign in to comment.