WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 4edf31c

Browse files
committed
fix: minor cleanup
1 parent e92d8b8 commit 4edf31c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/pages/fragmented-a-star/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,13 @@ export default function FragmentedAStar() {
272272
path.length = 0
273273
return
274274
}
275-
const current = openSet.has(lowestFScore) ? lowestFScore : Array.from(openSet).reduce<number | null>((min, cell) => {
275+
const current = openSet.has(lowestFScore) ? lowestFScore : Array.from(openSet).reduce((min, cell) => {
276276
if (!min || !fScore.has(min) || !fScore.get(cell))
277277
return cell
278-
return fScore.get(min)! < fScore.get(cell)!
279-
? min
280-
: cell
281-
}, null)!
278+
if (fScore.get(min)! < fScore.get(cell)!)
279+
return min
280+
return cell
281+
}, null!)
282282
lowestFScore = current
283283

284284
const x = current % SIDE

src/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ export const ROUTES = {
188188
title: '[WIP] Fragmented A*',
189189
},
190190
git: {
191-
lastModified: 0,
192-
firstAdded: 0
191+
lastModified: 1740872576000,
192+
firstAdded: 1727995709000
193193
},
194194
},
195195
"fragment-portal": {

0 commit comments

Comments
 (0)