-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d43e14
commit 10e4dab
Showing
2 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<script lang="ts" setup> | ||
import GameView from "~/components/GameView.vue" | ||
import Controller from "~/components/Controller.vue" | ||
import {Robot} from "~/classes/Robot" | ||
import {Level} from "~/classes/Level" | ||
import {watchEffect} from "#imports" | ||
import {useRouter} from "#app" | ||
import LayouGameBoy from "~/components/LayouGameBoy.vue"; | ||
const router = useRouter() | ||
const level = new Level({obstacles: new Set([3, 6, 10]), goal: 8}) | ||
const robo = new Robot({level}) | ||
let nextToggle = $ref(false) | ||
watchEffect(() => { | ||
if (robo._x >= level.goal) { | ||
nextToggle = true | ||
} | ||
}) | ||
</script> | ||
<template> | ||
<LayouGameBoy> | ||
<GameView | ||
:robo="robo" | ||
:resolution="12" | ||
/> | ||
<Controller | ||
:nextToggle="nextToggle" | ||
next-url="/chapter/console/2" | ||
:robo="robo" | ||
chapter-name="Methods" | ||
current-task="1" | ||
task-count="4" | ||
> | ||
<h2 class="text-5xl font-mono">Aufgabe 1</h2> | ||
<article> | ||
lorem | ||
</article> | ||
</Controller> | ||
</LayouGameBoy> | ||
</template> |