Skip to content

Commit 8c5ef13

Browse files
committed
A sound and bug fixes
add a sound and bug fixes
1 parent 38bd421 commit 8c5ef13

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

index.html

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
</head>
1010
<body onload="start();">
1111
<svg id="game"></svg>
12+
13+
<audio id="put">
14+
<source src="sounds/put.ogg" type="audio/ogg">
15+
<source src="sounds/put.mp3" type="audio/mpeg">
16+
</audio>
1217
</body>
1318

1419
</html>

js/script.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ function put(circle){
146146
if(change(circle.target.id)){
147147
var tmp = actualPlayer;
148148
actualPlayer=otPlayer;
149-
otPlayer = tmp;
149+
otPlayer = tmp;
150+
document.getElementById("put").play();
151+
150152
}
151153
}
152154
actualPlayer.inGame();

sounds/put.mp3

2.34 KB
Binary file not shown.

sounds/put.ogg

4.55 KB
Binary file not shown.

0 commit comments

Comments
 (0)