Fix recursive implies

main
Elbert Alias 4 years ago
parent 6c27004bbe
commit 78f6a1e442

@ -419,7 +419,7 @@ body.dynamic-icon .category__heading:hover .category__pin {
border-radius: 4px; border-radius: 4px;
line-height: 0; line-height: 0;
margin: auto; margin: auto;
width: calc(6rem + 2px); width: 6rem;
} }
.ttt-cell { .ttt-cell {

@ -114,6 +114,11 @@ function check(dryrun) {
complete.cells.forEach(({ el }) => el.classList.add('ttt-blink')) complete.cells.forEach(({ el }) => el.classList.add('ttt-blink'))
if (complete.player === 'o') {
ahead.classList.add('ttt-player-icon--hidden')
behind.classList.remove('ttt-player-icon--hidden')
}
setTimeout(() => { setTimeout(() => {
reset() reset()
}, 1200) }, 1200)
@ -131,8 +136,8 @@ function play(cells) {
setTimeout(() => { setTimeout(() => {
let found = false let found = false
search: for (const cell of cells) { search: for (const player of players) {
for (const player of players) { for (const cell of cells) {
cell.value = player cell.value = player
const { winner, empty } = check(true) const { winner, empty } = check(true)

@ -158,10 +158,10 @@ const Wappalyzer = {
resolveImplies(resolved) { resolveImplies(resolved) {
let done = false let done = false
while (resolved.length && !done) { do {
resolved.forEach(({ technology, confidence }) => { done = true
done = true
resolved.forEach(({ technology, confidence }) => {
technology.implies.forEach(({ name, confidence: _confidence }) => { technology.implies.forEach(({ name, confidence: _confidence }) => {
const implied = Wappalyzer.getTechnology(name) const implied = Wappalyzer.getTechnology(name)
@ -184,7 +184,7 @@ const Wappalyzer = {
} }
}) })
}) })
} } while (resolved.length && !done)
}, },
/** /**