add Game.currentState to indicate whether games are won/lost

This commit is contained in:
Thorsten Rausch
2021-06-18 13:03:25 +02:00
parent 60adfc1e49
commit 494109de79
3 changed files with 92 additions and 53 deletions

View File

@@ -8,9 +8,6 @@ class Player {
move_by(amount) {
this.position += amount;
//todo: move by 1 only on the last 3 fields
if (this.position >= 16) {
// todo: win
}
}
}