pocket-friends/pocket_friends/__main__.py

27 lines
628 B
Python
Raw Normal View History

"""
Launch script for Pocket Friends.
"""
import os
import pygame
import sys
2023-05-11 11:24:42 -04:00
from pathlib import Path
import pocket_friends.game as game
if __name__ == '__main__':
enable_dev = False
resolution = 240
# enable dev mode if --dev argument is passed
if len(sys.argv) > 0:
for arg in sys.argv:
if arg == '--delete-save':
save_dir = os.path.join(Path.home(), '.pocket_friends')
os.remove(save_dir + '/save.json')
if '--res=' in arg:
resolution = int(arg.split('=')[1])
2023-05-14 17:10:34 -04:00
game.start_game(resolution)
pygame.quit()
sys.exit()