File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1139,7 +1139,7 @@ vid.addEventListener("ended", function(){
1139
1139
} ) ;
1140
1140
window . addEventListener ( "keydown" , function ( e ) {
1141
1141
if ( "ogwbyr" . includes ( e . key ) ) {
1142
- currColour = e . key ;
1142
+ setColour ( e . key ) ;
1143
1143
}
1144
1144
} )
1145
1145
function pause ( ) {
@@ -1331,10 +1331,14 @@ function getAmount(){
1331
1331
}
1332
1332
function setColour ( hi ) {
1333
1333
for ( let i of document . getElementsByClassName ( "p" ) ) {
1334
- i . style . border = "3px solid black" ;
1334
+ if ( i . getAttribute ( "class" ) [ 0 ] == hi ) {
1335
+ i . style . border = "3px dashed black" ;
1336
+ }
1337
+ else {
1338
+ i . style . border = "3px solid black" ;
1339
+ }
1335
1340
}
1336
- currColour = hi . getAttribute ( "class" ) [ 0 ] ;
1337
- hi . style . border = "3px dashed black" ;
1341
+ currColour = hi ;
1338
1342
}
1339
1343
function updateText ( ) {
1340
1344
let sdfsd = "" ;
You can’t perform that action at this time.
0 commit comments