master
parent
6918d12b87
commit
7a62b4dd00
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Python: Current File",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/main.py",
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
]
|
||||
}
|
9
main.py
9
main.py
|
@ -11,8 +11,6 @@ import numpy as np
|
|||
pygame.init()
|
||||
FPS = 60
|
||||
|
||||
MAIN_PATH = "C:/Users/User/Documents/Coding/Picture_Puzzle/"
|
||||
# School: MAIN_PATH = "C:/Users/RVKG/Documents/My Palettes/Picture Puzzle/"
|
||||
IMAGES_PATH = "images/albums/"
|
||||
SIZE_PATH = "images/assets/"
|
||||
|
||||
|
@ -129,6 +127,7 @@ if current_size == SIZE_CHOICES[0]:
|
|||
arrow2 = (274, 0, 10, 13)
|
||||
spaces2 = [4, 5, 2, 5, 60, 42]
|
||||
spaces3 = [10, 20, 23]
|
||||
# --> i forgor U+1F480
|
||||
|
||||
elif current_size == SIZE_CHOICES[1]:
|
||||
WIDTH, HEIGHT = 202, 216
|
||||
|
@ -428,7 +427,7 @@ class ImageRender:
|
|||
return
|
||||
|
||||
self.current = image_names[self.index]
|
||||
selected_image = pygame.image.load(MAIN_PATH + IMAGES_PATH + self.album_name + "/" + self.current)
|
||||
selected_image = pygame.image.load(IMAGES_PATH + self.album_name + "/" + self.current)
|
||||
self.scaled_image = pygame.transform.scale(selected_image, (self.scaled_size[2], self.scaled_size[3]))
|
||||
current_img = self.current
|
||||
current_album = self.album_name
|
||||
|
@ -517,7 +516,7 @@ def load_puzzle():
|
|||
|
||||
puzzle_version = settings_data["grid"]
|
||||
image_path = puzzle_data[f'current {puzzle_version}']['selected_image']
|
||||
puzzle_image = pygame.image.load(MAIN_PATH + image_path)
|
||||
puzzle_image = pygame.image.load(image_path)
|
||||
|
||||
directions = {"up": [4, 8, 12],
|
||||
"down": [],
|
||||
|
@ -777,7 +776,7 @@ def set_hue():
|
|||
|
||||
sprite_sheet.set_hue(hue_value)
|
||||
|
||||
pygame.image.save(sprite_sheet.sheet, MAIN_PATH + SIZE_PATH + str(INT) + STYLE_PATH + "spritesheet.png")
|
||||
pygame.image.save(sprite_sheet.sheet, SIZE_PATH + str(INT) + STYLE_PATH + "spritesheet.png")
|
||||
|
||||
settings_data[gui][x] = hue_value
|
||||
with open(SETTINGS_FILE, "w") as settings_file:
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
99,
|
||||
"00:01:11",
|
||||
"00:00:46",
|
||||
6
|
||||
0
|
||||
],
|
||||
"2.png": [
|
||||
0,
|
||||
|
@ -17,7 +17,7 @@
|
|||
111,
|
||||
"00:01:00",
|
||||
"00:01:00",
|
||||
3
|
||||
0
|
||||
],
|
||||
"3.png": [
|
||||
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": [[6, 13, 10, 2], [4, 3, 5, 12], [11, 14, 8, 15], [1, 7, 9, 0]], "selected_image": "images/albums/Original images/2.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": [[1, 2, 4, 3], [9, 10, 15, 7], [0, 5, 12, 11], [8, 13, 6, 14]], "selected_image": "images/albums/Original images/1.png"}, "current 3x3": {"matrix": [[3, 6, 7], [5, 4, 1], [0, 8, 2]], "selected_image": "/images/albums/Birds/1.png"}}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"size": "big",
|
||||
"style": "dark",
|
||||
"size": "medium",
|
||||
"style": "classic",
|
||||
"grid": "4x4",
|
||||
"gui color": 0,
|
||||
"music": {
|
||||
|
|
Loading…
Reference in New Issue