master
parent
c436594f71
commit
12c4d3ee15
9
main.py
9
main.py
|
@ -11,7 +11,7 @@ import numpy as np
|
||||||
pygame.init()
|
pygame.init()
|
||||||
FPS = 60
|
FPS = 60
|
||||||
|
|
||||||
MAIN_PATH = "C:/Users/User/Documents/Coding/Picture Puzzle/"
|
MAIN_PATH = "C:/Users/User/Documents/Coding/Picture_Puzzle/"
|
||||||
#School: MAIN_PATH = "C:/Users/RVKG/Documents/My Palettes/Picture Puzzle/"
|
#School: MAIN_PATH = "C:/Users/RVKG/Documents/My Palettes/Picture Puzzle/"
|
||||||
IMAGES_PATH = "images/albums/"
|
IMAGES_PATH = "images/albums/"
|
||||||
SIZE_PATH = "images/assets/"
|
SIZE_PATH = "images/assets/"
|
||||||
|
@ -109,7 +109,7 @@ else:
|
||||||
puzzle_size = (360, 360)
|
puzzle_size = (360, 360)
|
||||||
non_movable_area = pygame.Rect(18, 48, 360, 360)
|
non_movable_area = pygame.Rect(18, 48, 360, 360)
|
||||||
timer_area = pygame.Rect(49, 5, 86, 32)
|
timer_area = pygame.Rect(49, 5, 86, 32)
|
||||||
win_area = pygame.Rect(71, 98, 55, 12)
|
win_area = pygame.Rect(200, 100, 55, 12)
|
||||||
size = [50, 55, 120, 35]
|
size = [50, 55, 120, 35]
|
||||||
cons = [35, 455, 25, 13, 26]
|
cons = [35, 455, 25, 13, 26]
|
||||||
scaled_size = (43, 48, 310, 310)
|
scaled_size = (43, 48, 310, 310)
|
||||||
|
@ -716,10 +716,13 @@ else:
|
||||||
ver2_layer = sprite_sheet.get_sprite((798, 156), WIDTH, HEIGHT, color_key=(255, 0, 128))
|
ver2_layer = sprite_sheet.get_sprite((798, 156), WIDTH, HEIGHT, color_key=(255, 0, 128))
|
||||||
|
|
||||||
path_components = puzzle_data[f'current {puzzle_version}']['selected_image'].split('/')[2:]
|
path_components = puzzle_data[f'current {puzzle_version}']['selected_image'].split('/')[2:]
|
||||||
|
print(path_components)
|
||||||
|
# why there was an error some time ago?
|
||||||
current_data = storage[path_components[0]]
|
current_data = storage[path_components[0]]
|
||||||
for component in path_components[1:]:
|
for component in path_components[1:]:
|
||||||
current_data = current_data[component]
|
current_data = current_data[component]
|
||||||
|
|
||||||
|
|
||||||
completed = current_data[1]
|
completed = current_data[1]
|
||||||
not_shuffled = current_data[2]
|
not_shuffled = current_data[2]
|
||||||
timer_text = current_data[5]
|
timer_text = current_data[5]
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
},
|
},
|
||||||
"Birds": {
|
"Birds": {
|
||||||
"1.png": [
|
"1.png": [
|
||||||
1,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -116,8 +116,8 @@
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
"00:00:00",
|
"00:00:01",
|
||||||
"00:00:00",
|
"00:00:01",
|
||||||
0
|
0
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"puzzle 4x4": [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 0]], "puzzle 3x3": [[1, 2, 3], [4, 5, 6], [7, 8, 0]], "current 4x4": {"matrix": [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 0]], "selected_image": "/images/albums/Birds/1.png"}, "current 3x3": {"matrix": [[3, 6, 7], [5, 4, 1], [0, 8, 2]], "selected_image": "/images/albums/Birds/1.png"}}
|
{"puzzle 4x4": [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 0]], "puzzle 3x3": [[1, 2, 3], [4, 5, 6], [7, 8, 0]], "current 4x4": {"matrix": [[6, 8, 0, 12], [1, 11, 13, 15], [5, 7, 14, 4], [2, 9, 10, 3]], "selected_image": "/images/albums/Birds/3.png"}, "current 3x3": {"matrix": [[3, 6, 7], [5, 4, 1], [0, 8, 2]], "selected_image": "/images/albums/Birds/1.png"}}
|
Loading…
Reference in New Issue