mirror of
https://github.com/osmarks/website
synced 2025-09-02 02:37:55 +00:00
Patch achievement system
This commit is contained in:
@@ -121,7 +121,16 @@ const doIns = (ins, state, handler) => {
|
||||
}
|
||||
}
|
||||
|
||||
let hasDoneAchievement = false
|
||||
|
||||
export const step = (state, handler, showIns, maxdepth) => {
|
||||
if (!hasDoneAchievement && state.stacks.length > 100) {
|
||||
if ("points" in window) {
|
||||
points.then(points => points.unlockAchievement("rpnv4recursion"))
|
||||
}
|
||||
hasDoneAchievement = true
|
||||
}
|
||||
|
||||
if (state.stacks.length > maxdepth) {
|
||||
throw 'max recursion depth exceeded'
|
||||
}
|
||||
|
Reference in New Issue
Block a user