Skip to content

Commit 9d388c6

Browse files
fix: mate bug & links on landing page
1 parent b2a41af commit 9d388c6

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

src/components/Home/AboutMaia.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ export const AboutMaia = () => {
319319
</p>
320320
</div>
321321
</section>
322-
<section className="flex min-h-[60vh] flex-col justify-evenly bg-white py-20 text-black">
322+
<section
323+
id="paper"
324+
className="flex min-h-[60vh] flex-col justify-evenly bg-white py-20 text-black"
325+
>
323326
<div className="mx-auto my-0 max-w-[1170px]">
324327
<div className="row col-lg-9 col-lg-offset-2 left-justify-section">
325328
<h3 className="text-center text-xl font-bold uppercase">Paper</h3>
@@ -413,7 +416,10 @@ export const AboutMaia = () => {
413416
</div>
414417
</div>
415418
</section>
416-
<section className="flex min-h-[60vh] flex-col justify-evenly bg-white py-20 text-black">
419+
<section
420+
id="data"
421+
className="flex min-h-[60vh] flex-col justify-evenly bg-white py-20 text-black"
422+
>
417423
<div className="mx-auto my-0 max-w-[1170px]">
418424
<div className="row col-lg-8 col-lg-offset-2 left-justify-section">
419425
<h3 className="text-center text-xl font-bold uppercase">Data</h3>
@@ -431,7 +437,10 @@ export const AboutMaia = () => {
431437
</div>
432438
</div>
433439
</section>
434-
<section className="flex min-h-[60vh] flex-col justify-evenly bg-white py-20 text-black">
440+
<section
441+
id="team"
442+
className="flex min-h-[60vh] flex-col justify-evenly bg-white py-20 text-black"
443+
>
435444
<div className="mx-auto my-0 max-w-[1170px]">
436445
<div>
437446
<h3 className="text-center text-xl font-bold uppercase">Team</h3>

src/hooks/useStockfishEngine/engine.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,9 @@ class Engine {
8383
}
8484

8585
if (!isNaN(mate) && isNaN(cp)) {
86-
if (this.fen.includes(' w ')) {
87-
cp = mate > 0 ? 10000 : -10000
88-
} else {
89-
cp = mate > 0 ? -10000 : 10000
90-
}
86+
console.log(msg)
87+
console.log(this.fen)
88+
cp = mate > 0 ? 10000 : -10000
9189
}
9290

9391
if (this.store[depth]) {
@@ -107,6 +105,7 @@ class Engine {
107105

108106
if (!this.store[depth].sent && multipv === this.legalMoveCount) {
109107
this.store[depth].sent = true
108+
console.log(Object.values(this.store[depth].cp_vec))
110109
this.callback(this.store[depth], this.moveIndex)
111110
}
112111
}

0 commit comments

Comments
 (0)