adding latest working

This commit is contained in:
2021-03-17 17:26:20 +00:00
parent 28ac00600d
commit 8a40e52604
2 changed files with 48 additions and 55 deletions

View File

@@ -1,5 +1,6 @@
<template>
<v-container fluid px-16 pb-10>
<!-- <v-container fluid px-16 pb-10> -->
<v-container>
<v-row>
<v-col cols="12">
<div class="text-center">
@@ -169,33 +170,25 @@ export default {
remove_shikigami(item) {
const index = this.selected_shikigami_names.indexOf(item.name);
if (index >= 0) {
console.log(`index: ${index}`);
this.selected_shikigami_names.splice(index, 1);
this.selected_shikigami_decks[index][index].splice(0);
// shuffle shikigami down by 1
console.log(
`length of next: ${
this.selected_shikigami_decks[index + 1][index + 1].length
}`
);
if (index <= 3) {
for (
let i = 0;
i < this.selected_shikigami_decks[index + 1][index + 1].length;
i++
) {
console.log(`i: ${i}`);
this.selected_shikigami_decks[index][index].push(
this.selected_shikigami_decks[index + 1][index + 1][i]
);
// this.selected_shikigami_decks[index + 1][index + 1].splice(i, 1);
// push/pop
// this.selected_shikigami_decks[index][index].push(
// this.selected_shikigami_decks[index + 1][index + 1].pop()
// );
for (let j = index; j <= 2; j++) {
for (
let i = 0;
i < this.selected_shikigami_decks[j + 1][j + 1].length;
i++
) {
// this if is optional?
if (index < 3) {
this.selected_shikigami_decks[j][j].push(
this.selected_shikigami_decks[j + 1][j + 1][i]
);
}
}
this.selected_shikigami_decks[j + 1][j + 1] = [];
}
this.selected_shikigami_decks[index + 1][index + 1] = [];
}
}
},