added move bacck
This commit is contained in:
parent
cbdc445539
commit
f5db453a7c
12
game.html
12
game.html
@ -69,7 +69,8 @@
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -133,6 +134,15 @@
|
|||||||
this.round.transport = null
|
this.round.transport = null
|
||||||
this.round.tief = Array.from(new Set(tief))
|
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) {
|
listPossibleTransports(round) {
|
||||||
let values = []
|
let values = []
|
||||||
for (let item in round.tief) {
|
for (let item in round.tief) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user