Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
YariKartoshe4ka committed Jul 13, 2020
2 parents e9d407e + 634408e commit 2537301
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"sub_scene": "game",
"speed": 2,
"score": 0,
"version": "1.0.0"
"version": "1.1.0"
}
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
from json import load
from updater import check_software_updates

import pygame

import scenes.headpiece.functions
import scenes.lobby.functions
import scenes.table.functions
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pygame==1.9.6
packaging==2.4.7
packaging==20.4
requests==2.24.0
Empty file removed scenes/game/__init__.py
Empty file.
34 changes: 17 additions & 17 deletions scenes/game/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,26 +187,25 @@ def check_collides(config, base_dir, astrs, boosts, plate, play, table, settings
boosts_collides = pygame.sprite.spritecollide(plate, boosts, False)

if astrs_collides:
if config['user']['effects']:
pygame.mixer.music.load(plate.sounds['bang'])
pygame.mixer.music.play()

for boost in boosts:
if boost.name == 'shield' and boost.is_active:
boosts.remove(boost)
break
else:
for astr in astrs_collides:
if config['user']['effects']:
pygame.mixer.music.load(plate.sounds['bang'])
pygame.mixer.music.play()

with open(f'{base_dir}/config/score.csv', 'a') as file:
line = ','.join([str(config['score']), config['user']['nick']]) + '\n'
file.write(line)
with open(f'{base_dir}/config/score.csv', 'a') as file:
line = ','.join([str(config['score']), config['user']['nick']]) + '\n'
file.write(line)

plate.reset()
astrs.empty()
boosts.empty()
plate.reset()
astrs.empty()
boosts.empty()

config['speed'] = 2
config['sub_scene'] = 'end'
config['speed'] = 2
config['sub_scene'] = 'end'

elif boosts_collides and not boosts_collides[0].is_active:
boost = boosts_collides[0]
Expand All @@ -224,15 +223,16 @@ def check_collides(config, base_dir, astrs, boosts, plate, play, table, settings


elif plate.rect.bottom >= plate.screen_rect.bottom:
if config['user']['effects']:
pygame.mixer.music.load(plate.sounds['bang'])
pygame.mixer.music.play()

for boost in boosts:
if boost.name == 'shield' and boost.is_active:
boosts.remove(boost)
plate.is_jump = True
break
else:
if config['user']['effects']:
pygame.mixer.music.load(plate.sounds['bang'])
pygame.mixer.music.play()

with open(f'{base_dir}/config/score.csv', 'a') as file:
line = ','.join([str(config['score']), config['user']['nick']]) + '\n'
file.write(line)
Expand Down
Empty file removed scenes/headpiece/__init__.py
Empty file.
Empty file removed scenes/lobby/__init__.py
Empty file.
Empty file removed scenes/settings/__init__.py
Empty file.
Empty file removed scenes/table/__init__.py
Empty file.

0 comments on commit 2537301

Please sign in to comment.