added move bacck

This commit is contained in:
Peter Hudec 2023-12-17 14:55:35 +01:00
parent cbdc445539
commit f5db453a7c

View File

@ -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) {