Skip to content

Commit

Permalink
add spoken digits from AudioMNIST
Browse files Browse the repository at this point in the history
  • Loading branch information
h908714124 committed Oct 12, 2024
1 parent 4d79218 commit 58605de
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 7 deletions.
Binary file added src/main/client/public/1.wav
Binary file not shown.
Binary file added src/main/client/public/2.wav
Binary file not shown.
Binary file added src/main/client/public/3.wav
Binary file not shown.
Binary file added src/main/client/public/4.wav
Binary file not shown.
Binary file added src/main/client/public/5.wav
Binary file not shown.
Binary file added src/main/client/public/6.wav
Binary file not shown.
Binary file added src/main/client/public/7.wav
Binary file not shown.
Binary file added src/main/client/public/8.wav
Binary file not shown.
Binary file added src/main/client/public/9.wav
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/client/src/feature/game/Game.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function Board({gameState, setGameState}) {
}
if (!howler.current) {
howler.current = new Howl({
src: ["/app/stone1.wav"],
src: [base + "/stone1.wav"],
onloaderror: (id, error) => {
throw new Error(id + ": " + error)
},
Expand Down
12 changes: 6 additions & 6 deletions src/main/client/src/feature/lobby/OpenGames.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function OpenGame({game, onClick}) {

function ChallengeDialog({lobbyState, setLobbyState, acceptableGame, acceptDialogRef}) {
let [isFlip, setFlip] = useState(false)
let [handi, setHandi] = useState(1)
let [handicap, setHandicap] = useState(1)
let auth = useAuthStore(state => state.auth)
let zAccept = getZindex(lobbyState, "accept")
return (
Expand All @@ -140,7 +140,7 @@ function ChallengeDialog({lobbyState, setLobbyState, acceptableGame, acceptDialo
body: JSON.stringify({
game: acceptableGame?.game,
flip: isFlip,
handicap: handi === 1 ? 0 : handi,
handicap: handicap === 1 ? 0 : handicap,
}),
})
setLobbyState(closeLobbyPopup(lobbyState))
Expand Down Expand Up @@ -169,19 +169,19 @@ function ChallengeDialog({lobbyState, setLobbyState, acceptableGame, acceptDialo
<div className="mt-2 text-black py-1">
<div className="inline-flex">
<span>Handicap:</span>
<button type="button" disabled={handi === 1} onClick={() => setHandi(Math.max(1, handi - 1))}>
<button type="button" disabled={handicap === 1} onClick={() => setHandicap(Math.max(1, handicap - 1))}>
<IconContext.Provider value={{
size: "1.25em",
className: twJoin(
"px-1",
handi === 1 && "text-slate-400",
handicap === 1 && "text-slate-400",
)
}}>
<FaAngleLeft />
</IconContext.Provider>
</button>
<span className="font-bold">{handi === 1 ? "0" : handi}</span>
<button type="button" className="" onClick={() => setHandi(handi + 1)}>
<span className="font-bold">{handicap === 1 ? "0" : handicap}</span>
<button type="button" className="" onClick={() => setHandicap(handicap + 1)}>
<IconContext.Provider value={{ size: "1.25em", className: "pl-1" }}>
<FaAngleRight />
</IconContext.Provider>
Expand Down

0 comments on commit 58605de

Please sign in to comment.