added move bacck
This commit is contained in:
parent
cbdc445539
commit
f5db453a7c
12
game.html
12
game.html
@ -69,7 +69,8 @@
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit">Move</button>
|
||||
<button type="submit" class="btn btn-outline-primary">Move</button>
|
||||
<button v-if="rounds.length" type="button" class="btn btn-outline-danger" v-on:click="gameBack">Back</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -133,6 +134,15 @@
|
||||
this.round.transport = null
|
||||
this.round.tief = Array.from(new Set(tief))
|
||||
},
|
||||
gameBack(e) {
|
||||
if (this.rounds.lenght == 0) {
|
||||
return
|
||||
}
|
||||
last = this.rounds.pop()
|
||||
this.round.police = last.police
|
||||
this.round.transport = last.transport
|
||||
this.round.tief = last.tief
|
||||
},
|
||||
listPossibleTransports(round) {
|
||||
let values = []
|
||||
for (let item in round.tief) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user