Winning screen

This commit is contained in:
H4CK3R-01
2021-07-05 15:57:59 +02:00
committed by H4CK3R-01
parent c9edfb9232
commit b4f783e19e
3 changed files with 87 additions and 56 deletions

View File

@@ -6,12 +6,14 @@ class Player {
}
move_by(amount) {
if(this.position > 11){
this.position++;
}else if(this.position+amount > 11){
this.position = 12;
}else{
this.position += amount;
if (this.position !== 16) {
if (this.position > 11) {
this.position++;
} else if (this.position + amount > 11) {
this.position = 12;
} else {
this.position += amount;
}
}
}
}