mirror of
https://github.com/Kugelschieber/breach.git
synced 2026-01-18 12:00:25 +00:00
Added game state to all components, renamed timeout to timeoutMilliseconds, removed score from savegame.
This commit is contained in:
@@ -3,19 +3,24 @@
|
||||
<h2>Code-Matrix</h2>
|
||||
<div class="matrix-row" v-for="i in size" :key="i">
|
||||
<div class="matrix-column" v-for="j in size" :key="j">
|
||||
{{matrix[(i - 1)*5 + (j - 1)]}}
|
||||
{{matrix[(i - 1)*size + (j - 1)]}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent} from "vue";
|
||||
import {defineComponent, inject} from "vue";
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
size: {type: Number, required: true},
|
||||
matrix: {type: Array, required: true},
|
||||
setup() {
|
||||
const size = inject("size");
|
||||
const matrix = inject("matrix");
|
||||
|
||||
return {
|
||||
size,
|
||||
matrix
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user