Skip to content

Commit 719dc82

Browse files
fix(blitz): now user gains half seconds when completing a puzzle with a suboptimal solution
1 parent 974f026 commit 719dc82

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/utility/play_mode/timer_options.gd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ class_name TimerOptions extends Resource
1515
## Calculate time gained for complete level
1616
func get_time_gained(needed_moves: int, used_moves: int) -> int:
1717

18-
# Baseline for wasted moves
19-
if used_moves > needed_moves:
20-
print("[Arena Score] Suboptimal solution, gains 1s")
21-
return 1
22-
2318
# Player-validated difficulty
2419
var estimated_needed_moves: int = min(needed_moves, used_moves)
2520

@@ -44,4 +39,9 @@ func get_time_gained(needed_moves: int, used_moves: int) -> int:
4439
if used_moves < needed_moves:
4540
time_sum += 1
4641

42+
# Baseline for wasted moves
43+
if used_moves > needed_moves:
44+
print("[Arena Score] Suboptimal solution, gain half of the seconds")
45+
return 1 + roundi(time_sum / 2)
46+
4747
return 1 + roundi(time_sum)

0 commit comments

Comments
 (0)