diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-02-21 21:00:05 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-02-21 21:00:05 +0100 |
commit | 060b585da1d6beb7dc214d1eb70bcd73ac41ed86 (patch) | |
tree | 2800fdad03797148afea5d05985c771343fbc29b /web/pw-server/src/routes | |
parent | 9c90e79575afb3ab2574f1d7e0fc79d7fae90458 (diff) | |
download | planetwars.dev-060b585da1d6beb7dc214d1eb70bcd73ac41ed86.tar.xz planetwars.dev-060b585da1d6beb7dc214d1eb70bcd73ac41ed86.zip |
add default code to get started
Diffstat (limited to 'web/pw-server/src/routes')
-rw-r--r-- | web/pw-server/src/routes/index.svelte | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/pw-server/src/routes/index.svelte b/web/pw-server/src/routes/index.svelte index 46eb635..56cb6f4 100644 --- a/web/pw-server/src/routes/index.svelte +++ b/web/pw-server/src/routes/index.svelte @@ -10,6 +10,8 @@ import ace from "ace-builds/src-noconflict/ace?client"; import * as AcePythonMode from "ace-builds/src-noconflict/mode-python?client"; + import defaultBotCode from "../assets/bot_template.txt?raw"; + let matches = []; let selectedMatchId: string | undefined = undefined; @@ -22,7 +24,7 @@ }); function init_editor() { - editSession = new ace.EditSession(""); + editSession = new ace.EditSession(defaultBotCode); editSession.setMode(new AcePythonMode.Mode()); } |