Winning screen
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user