Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b1c18e0

Browse files
feat: change sizes to 16, 32, 64 and default to 16
128 was just a bit too much for quadratic algorithms and 8 is pretty pointless.
1 parent 59feff6 commit b1c18e0

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

‎models/array_model.gd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ signal removed(i)
55
signal swapped(i, j)
66
signal sorted(i, j)
77

8-
const DEFAULT_SIZE = 32
8+
const DEFAULT_SIZE = 16
99
enum DATA_TYPES {
1010
RANDOM_UNIQUE,
1111
TRUE_RANDOM,

‎scenes/levels.tscn‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,14 @@ margin_right = 163.0
164164
margin_bottom = 90.0
165165

166166
[node name="Sizes" type="Label" parent="Levels/Level/Right/Info/ScoresContainer/Scores/Data"]
167-
margin_right = 30.0
167+
margin_right = 20.0
168168
margin_bottom = 63.0
169-
text = "8
169+
text = "16
170170
32
171-
128"
171+
64"
172172

173173
[node name="Times" type="Label" parent="Levels/Level/Right/Info/ScoresContainer/Scores/Data"]
174-
margin_left = 38.0
174+
margin_left = 28.0
175175
margin_right = 163.0
176176
margin_bottom = 63.0
177177
size_flags_horizontal = 3

‎scripts/levels.gd‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const LEVELS = [
1515

1616
const MIN_WAIT = 1.0 / 64
1717
const MAX_WAIT = 4
18-
const MIN_SIZE = 8
19-
const MAX_SIZE = 128
18+
const MIN_SIZE = 16
19+
const MAX_SIZE = 64
2020

2121
var _index = LEVELS.find(GlobalScene.get_param("level", LEVELS[0]))
2222
var _level: ComparisonSort
@@ -98,10 +98,10 @@ func _input(event):
9898
if event.is_action_pressed("ui_right", true):
9999
_switch_level(_index + 1)
100100
if event.is_action_pressed("bigger"):
101-
_size = min(_size * 4, MAX_SIZE)
101+
_size = min(_size * 2, MAX_SIZE)
102102
_reload()
103103
if event.is_action_pressed("smaller"):
104-
_size = max(_size / 4, MIN_SIZE)
104+
_size = max(_size / 2, MIN_SIZE)
105105
_reload()
106106
if event.is_action_pressed("faster"):
107107
$Timer.wait_time = max($Timer.wait_time / 4, MIN_WAIT)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /