@rian8337/osu-difficulty-calculator 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,17 +43,19 @@ if (!beatmapInfo.title) {
43
43
  }
44
44
 
45
45
  // Calculate osu!droid difficulty
46
- const droidRating = new DroidDifficultyCalculator(beatmapInfo.map).calculate();
46
+ const droidRating = new DroidDifficultyCalculator(
47
+ beatmapInfo.beatmap
48
+ ).calculate();
47
49
 
48
50
  console.log(droidRating);
49
51
 
50
52
  // Calculate osu!standard difficulty
51
- const osuRating = new OsuDifficultyCalculator(beatmapInfo.map).calculate();
53
+ const osuRating = new OsuDifficultyCalculator(beatmapInfo.beatmap).calculate();
52
54
 
53
55
  console.log(osuRating);
54
56
 
55
57
  // Calculate both osu!droid and osu!standard difficulty
56
- const rating = new MapStars(beatmapInfo.map);
58
+ const rating = new MapStars(beatmapInfo.beatmap);
57
59
 
58
60
  // osu!droid difficulty
59
61
  console.log(rating.droid);
@@ -87,7 +89,7 @@ const stats = new MapStats({
87
89
  });
88
90
 
89
91
  // Also available in `DroidDifficultyCalculator` and `OsuDifficultyCalculator` as a parameter of `calculate`
90
- const rating = new MapStars(beatmapInfo.map, {
92
+ const rating = new MapStars(beatmapInfo.beatmap, {
91
93
  mods: mods,
92
94
  stats: stats,
93
95
  });
@@ -114,7 +116,7 @@ if (!beatmapInfo.title) {
114
116
  return console.log("Beatmap not found");
115
117
  }
116
118
 
117
- const rating = new MapStars(beatmapInfo.map);
119
+ const rating = new MapStars(beatmapInfo.beatmap);
118
120
 
119
121
  // osu!droid performance
120
122
  const droidPerformance = new DroidPerformanceCalculator(
@@ -152,7 +154,7 @@ if (!beatmapInfo.title) {
152
154
  return console.log("Beatmap not found");
153
155
  }
154
156
 
155
- const rating = new OsuDifficultyCalculator(beatmapInfo.map).calculate();
157
+ const rating = new OsuDifficultyCalculator(beatmapInfo.beatmap).calculate();
156
158
 
157
159
  const accuracy = new Accuracy({
158
160
  // Specify your misses here