Skip to content

Commit fda774f

Browse files
authored
Merge pull request #4 from xRookieFight/patch/optimize
Minor optimize changes and improved README file
2 parents 32cfafa + 56286d9 commit fda774f

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# calendarjs
2-
A calendar library for CraftersMC SkyBlock
1+
# 📅 CalendarJS
2+
3+
**CalendarJS** is a lightweight time management library for **CraftersMC Skyblock**.
4+
5+
## 🚀 Usage
36

47
```javascript
58
var {
@@ -25,4 +28,4 @@ console.log(`Crops for ${testEventId}: ${FarmingContestUtils.getCrops(testEventI
2528

2629
currentEventId = FarmingContestUtils.getEventId();
2730
console.log(`Crops for ${currentEventId}: ${FarmingContestUtils.getCrops(currentEventId)}`)
28-
```
31+
```

calendar.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ const CropType = Object.freeze([
2424
]);
2525

2626
function shuffleWithRandom(arr, rng) {
27-
const a = arr.slice();
28-
for (let i = a.length - 1; i > 0; i--) {
29-
const j = rng.nextInt(i + 1); // [0, i]
30-
const tmp = a[i]; a[i] = a[j]; a[j] = tmp;
31-
}
32-
return a;
27+
const a = arr.slice();
28+
for (let i = a.length - 1; i > 0; i--) {
29+
const j = rng.nextInt(i + 1);
30+
[a[i], a[j]] = [a[j], a[i]];
31+
}
32+
return a;
3333
}
3434

3535
function makeJavaRandomFromLongSeed(longSeed) {

0 commit comments

Comments
 (0)