update
This commit is contained in:
parent
b1f7e9dff6
commit
931b6f61d3
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -16,39 +16,43 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
module mod_vtm
|
||||
module lib_list
|
||||
{
|
||||
|
||||
export module mod_helfer
|
||||
/**
|
||||
* @author kcf <vidofnir@folksprak.org>
|
||||
*/
|
||||
export function sequence
|
||||
(
|
||||
length : int
|
||||
)
|
||||
: Array<int>
|
||||
{
|
||||
|
||||
/**
|
||||
* @author kcf <vidofnir@folksprak.org>
|
||||
*/
|
||||
export function sequence(laenge : int) : Array<int>
|
||||
{
|
||||
return ((laenge <= 0) ? [] : sequence(laenge-1).concat([laenge-1]));
|
||||
}
|
||||
return ((length <= 0) ? [] : sequence(length-1).concat([length-1]));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author kcf <vidofnir@folksprak.org>
|
||||
*/
|
||||
export function list_copy<type_element>(liste : Array<type_element>, element_kopieren : (element : type_element)=>type_element = (x => x)) : Array<type_element>
|
||||
{
|
||||
let liste_ : Array<type_element> = [];
|
||||
liste.forEach
|
||||
(
|
||||
element =>
|
||||
{
|
||||
let element_ : type_element = element_kopieren(element);
|
||||
liste_.push(element);
|
||||
}
|
||||
)
|
||||
;
|
||||
return liste_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @author kcf <vidofnir@folksprak.org>
|
||||
*/
|
||||
export function copy<type_element>
|
||||
(
|
||||
list : Array<type_element>,
|
||||
copy_element : (element : type_element)=>type_element = (x => x)
|
||||
)
|
||||
: Array<type_element>
|
||||
{
|
||||
let list_ : Array<type_element> = [];
|
||||
list.forEach
|
||||
(
|
||||
element =>
|
||||
{
|
||||
let element_ : type_element = copy_element(element);
|
||||
list_.push(element);
|
||||
}
|
||||
)
|
||||
;
|
||||
return list_;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,3 +1,20 @@
|
|||
<!--
|
||||
Verrückte Turing-Maschinen — A turing complete game
|
||||
Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -16,6 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$hue: 135;
|
||||
|
||||
html
|
||||
{
|
||||
margin: 0;
|
||||
|
|
@ -23,8 +25,8 @@ html
|
|||
height: 100%;
|
||||
*/
|
||||
|
||||
background-color: hsl(120, 0%, 0%);
|
||||
color: hsl(120, 0%, 100%);
|
||||
background-color: hsl($hue, 0%, 0%);
|
||||
color: hsl($hue, 0%, 100%);
|
||||
|
||||
font-family: monospace;
|
||||
line-height: 200%;
|
||||
|
|
@ -36,8 +38,8 @@ body
|
|||
padding: 8px;
|
||||
height: 100%;
|
||||
|
||||
background-color: hsl(120, 0%, 6.125%);
|
||||
color: hsl(120, 0%, 93.75%);
|
||||
background-color: hsl($hue, 0%, 6.125%);
|
||||
color: hsl($hue, 0%, 93.75%);
|
||||
}
|
||||
|
||||
a
|
||||
|
|
@ -47,12 +49,12 @@ a
|
|||
|
||||
&:not(:hover)
|
||||
{
|
||||
color: hsl(120, 50%, 50%);
|
||||
color: hsl($hue, 50%, 50%);
|
||||
}
|
||||
|
||||
&:hover
|
||||
{
|
||||
color: hsl(120, 50%, 75%);
|
||||
color: hsl($hue, 50%, 75%);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -79,14 +81,14 @@ input,select,textarea,button
|
|||
|
||||
&:not(:hover)
|
||||
{
|
||||
background-color: hsl(120, 0%, 25%);
|
||||
color: hsl(120, 0%, 100%);
|
||||
background-color: hsl($hue, 0%, 25%);
|
||||
color: hsl($hue, 0%, 100%);
|
||||
}
|
||||
|
||||
&:hover
|
||||
{
|
||||
background-color: hsl(120, 50%, 25%);
|
||||
color: hsl(120, 0%, 100%);
|
||||
background-color: hsl($hue, 50%, 25%);
|
||||
color: hsl($hue, 0%, 100%);
|
||||
|
||||
transition: 0.25s ease;
|
||||
}
|
||||
|
|
@ -128,8 +130,8 @@ body > header
|
|||
margin: 8px;
|
||||
padding: 8px;
|
||||
|
||||
background-color: hsl(120, 0%, 12.5%);
|
||||
color: hsl(120, 0%, 87.5%);
|
||||
background-color: hsl($hue, 0%, 12.5%);
|
||||
color: hsl($hue, 0%, 87.5%);
|
||||
}
|
||||
|
||||
#section_left
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -83,10 +83,10 @@ module mod_vtm
|
|||
{
|
||||
// Übersetzungen
|
||||
{
|
||||
let languages : Array<string> = navigator.languages.map(language => language);
|
||||
let language_nativ : string = "de";
|
||||
if (! languages[""+"includes"](language_nativ))
|
||||
languages.push(language_nativ);
|
||||
let languages : Array<string> = navigator.languages;
|
||||
let language_native : string = "de";
|
||||
if (! languages[""+"includes"](language_native))
|
||||
languages.push(language_native);
|
||||
lib_translate.setup(languages);
|
||||
lib_translate.deploy(document);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -82,7 +82,7 @@ module mod_vtm
|
|||
*/
|
||||
function bind(game : type_game) : void
|
||||
{
|
||||
mod_vtm.mod_model.mod_game.lauschen
|
||||
mod_vtm.mod_model.mod_game.listen
|
||||
(
|
||||
game.model,
|
||||
"change_task",
|
||||
|
|
@ -108,7 +108,7 @@ module mod_vtm
|
|||
}
|
||||
)
|
||||
;
|
||||
mod_vtm.mod_model.mod_game.lauschen
|
||||
mod_vtm.mod_model.mod_game.listen
|
||||
(
|
||||
game.model,
|
||||
"change_world",
|
||||
|
|
@ -125,7 +125,7 @@ module mod_vtm
|
|||
}
|
||||
)
|
||||
;
|
||||
mod_vtm.mod_model.mod_game.lauschen
|
||||
mod_vtm.mod_model.mod_game.listen
|
||||
(
|
||||
game.model,
|
||||
"change_token",
|
||||
|
|
@ -135,7 +135,7 @@ module mod_vtm
|
|||
}
|
||||
)
|
||||
;
|
||||
mod_vtm.mod_model.mod_game.lauschen
|
||||
mod_vtm.mod_model.mod_game.listen
|
||||
(
|
||||
game.model,
|
||||
"change_mode",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -100,7 +100,7 @@ module mod_vtm
|
|||
return (
|
||||
lib_svg.path
|
||||
(
|
||||
mod_vtm.mod_helfer.sequence(6).map(i => lib_vector.polar(((i+0.5)/6) * (2*Math.PI), 0.5)),
|
||||
lib_list.sequence(6).map(i => lib_vector.polar(((i+0.5)/6) * (2*Math.PI), 0.5)),
|
||||
true,
|
||||
{
|
||||
"class": "rahmen"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -321,7 +321,7 @@ module mod_vtm
|
|||
return spot;
|
||||
}
|
||||
;
|
||||
mod_vtm.mod_model.mod_game.lauschen
|
||||
mod_vtm.mod_model.mod_game.listen
|
||||
(
|
||||
game.model,
|
||||
"change_task",
|
||||
|
|
@ -331,7 +331,7 @@ module mod_vtm
|
|||
}
|
||||
)
|
||||
;
|
||||
mod_vtm.mod_model.mod_game.lauschen
|
||||
mod_vtm.mod_model.mod_game.listen
|
||||
(
|
||||
game.model,
|
||||
"change_world",
|
||||
|
|
@ -341,7 +341,7 @@ module mod_vtm
|
|||
}
|
||||
)
|
||||
;
|
||||
mod_vtm.mod_model.mod_game.lauschen
|
||||
mod_vtm.mod_model.mod_game.listen
|
||||
(
|
||||
game.model,
|
||||
"change_token",
|
||||
|
|
@ -351,7 +351,7 @@ module mod_vtm
|
|||
}
|
||||
)
|
||||
;
|
||||
mod_vtm.mod_model.mod_game.lauschen
|
||||
mod_vtm.mod_model.mod_game.listen
|
||||
(
|
||||
game.model,
|
||||
"change_mode",
|
||||
|
|
@ -372,7 +372,7 @@ module mod_vtm
|
|||
let spot_ : lib_errormonade.type_errormonade<mod_vtm.mod_model.mod_spot.type_spot> = spot_determine(event.target);
|
||||
if (lib_errormonade.filled(spot_))
|
||||
{
|
||||
mod_vtm.mod_model.mod_game.world_tile_wechseln(game.model, lib_errormonade.read(spot_), false);
|
||||
mod_vtm.mod_model.mod_game.world_tile_change(game.model, lib_errormonade.read(spot_), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -391,7 +391,7 @@ module mod_vtm
|
|||
let spot_ : lib_errormonade.type_errormonade<mod_vtm.mod_model.mod_spot.type_spot> = spot_determine(event.target);
|
||||
if (lib_errormonade.filled(spot_))
|
||||
{
|
||||
mod_vtm.mod_model.mod_game.world_tile_wechseln(game.model, lib_errormonade.read(spot_), true);
|
||||
mod_vtm.mod_model.mod_game.world_tile_change(game.model, lib_errormonade.read(spot_), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -410,8 +410,8 @@ module mod_vtm
|
|||
let spot_ : lib_errormonade.type_errormonade<mod_vtm.mod_model.mod_spot.type_spot> = spot_determine(event.target);
|
||||
if (lib_errormonade.filled(spot_))
|
||||
{
|
||||
let inkrement : int = ((event["deltaY"] < 0) ? -1 : +1);
|
||||
mod_vtm.mod_model.mod_game.world_tile_rotate(game.model, lib_errormonade.read(spot_), inkrement);
|
||||
let increment : int = ((event["deltaY"] < 0) ? -1 : +1);
|
||||
mod_vtm.mod_model.mod_game.world_tile_rotate(game.model, lib_errormonade.read(spot_), increment);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -37,7 +37,7 @@ module mod_vtm
|
|||
export type signature_actuator =
|
||||
{
|
||||
example : ()=>type_actuator;
|
||||
rotate : (actuator : type_actuator, inkrement : int)=>void;
|
||||
rotate : (actuator : type_actuator, increment : int)=>void;
|
||||
use : (actuator : type_actuator, token : mod_token.type_token)=>void;
|
||||
export : (actuator : type_actuator)=>any;
|
||||
import : (raw : any)=>type_actuator;
|
||||
|
|
@ -74,9 +74,9 @@ module mod_vtm
|
|||
/**
|
||||
* @author kcf <vidofnir@folksprak.org>
|
||||
*/
|
||||
export function rotate(actuator : type_actuator, inkrement ?: int) : void
|
||||
export function rotate(actuator : type_actuator, increment ?: int) : void
|
||||
{
|
||||
return lib_trait.deploy(trait_actuator, actuator.kind)["rotate"](actuator, inkrement);
|
||||
return lib_trait.deploy(trait_actuator, actuator.kind)["rotate"](actuator, increment);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -86,7 +86,7 @@ module mod_vtm
|
|||
function rotate
|
||||
(
|
||||
acceptor : type_acceptor,
|
||||
inkrement ?: int
|
||||
increment ?: int
|
||||
)
|
||||
: void
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@ module mod_vtm
|
|||
kind,
|
||||
{
|
||||
"example": () => lib_call.wrap(kind, example()),
|
||||
"rotate": (actuator, inkrement) => rotate(lib_call.unwrap(actuator), inkrement),
|
||||
"rotate": (actuator, increment) => rotate(lib_call.unwrap(actuator), increment),
|
||||
"use": (actuator, token) => use(lib_call.unwrap(actuator), token),
|
||||
"export": (actuator) => ({"kind": kind, "data": export_(actuator.data)}),
|
||||
"import": (raw) => lib_call.wrap(kind, import_(raw["data"])),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -103,11 +103,11 @@ module mod_vtm
|
|||
function rotate
|
||||
(
|
||||
conveyer : type_conveyer,
|
||||
inkrement : int = +1
|
||||
increment : int = +1
|
||||
)
|
||||
: void
|
||||
{
|
||||
conveyer.direction = mod_direction.add(conveyer.direction, inkrement);
|
||||
conveyer.direction = mod_direction.add(conveyer.direction, increment);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ module mod_vtm
|
|||
kind,
|
||||
{
|
||||
"example": () => lib_call.wrap(kind, example()),
|
||||
"rotate": (actuator, inkrement) => rotate(lib_call.unwrap(actuator), inkrement),
|
||||
"rotate": (actuator, increment) => rotate(lib_call.unwrap(actuator), increment),
|
||||
"use": (actuator, token) => use(lib_call.unwrap(actuator), token),
|
||||
"export": (actuator) => ({"kind": kind, "data": export_(actuator.data)}),
|
||||
"import": (raw) => lib_call.wrap(kind, import_(raw["data"])),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -103,11 +103,11 @@ module mod_vtm
|
|||
function rotate
|
||||
(
|
||||
generator : type_generator,
|
||||
inkrement : int = +1
|
||||
increment : int = +1
|
||||
)
|
||||
: void
|
||||
{
|
||||
generator.direction = mod_direction.add(generator.direction, inkrement);
|
||||
generator.direction = mod_direction.add(generator.direction, increment);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ module mod_vtm
|
|||
kind,
|
||||
{
|
||||
"example": () => lib_call.wrap(kind, example()),
|
||||
"rotate": (actuator, inkrement) => rotate(lib_call.unwrap(actuator), inkrement),
|
||||
"rotate": (actuator, increment) => rotate(lib_call.unwrap(actuator), increment),
|
||||
"use": (actuator, token) => use(lib_call.unwrap(actuator), token),
|
||||
"export": (actuator) => ({"kind": kind, "data": export_(actuator.data)}),
|
||||
"import": (raw) => lib_call.wrap(kind, import_(raw["data"])),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -137,11 +137,11 @@ module mod_vtm
|
|||
function rotate
|
||||
(
|
||||
reader : type_reader,
|
||||
inkrement : int = +1
|
||||
increment : int = +1
|
||||
)
|
||||
: void
|
||||
{
|
||||
reader.direction = mod_direction.add(reader.direction, inkrement);
|
||||
reader.direction = mod_direction.add(reader.direction, increment);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ module mod_vtm
|
|||
kind,
|
||||
{
|
||||
"example": () => lib_call.wrap(kind, example()),
|
||||
"rotate": (actuator, inkrement) => rotate(lib_call.unwrap(actuator), inkrement),
|
||||
"rotate": (actuator, increment) => rotate(lib_call.unwrap(actuator), increment),
|
||||
"use": (actuator, token) => use(lib_call.unwrap(actuator), token),
|
||||
"export": (actuator) => ({"kind": kind, "data": export_(actuator.data)}),
|
||||
"import": (raw) => lib_call.wrap(kind, import_(raw["data"])),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -86,7 +86,7 @@ module mod_vtm
|
|||
function rotate
|
||||
(
|
||||
rejector : type_rejector,
|
||||
inkrement ?: int
|
||||
increment ?: int
|
||||
)
|
||||
: void
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@ module mod_vtm
|
|||
kind,
|
||||
{
|
||||
"example": () => lib_call.wrap(kind, example()),
|
||||
"rotate": (actuator, inkrement) => rotate(lib_call.unwrap(actuator), inkrement),
|
||||
"rotate": (actuator, increment) => rotate(lib_call.unwrap(actuator), increment),
|
||||
"use": (actuator, token) => use(lib_call.unwrap(actuator), token),
|
||||
"export": (actuator) => ({"kind": kind, "data": export_(actuator.data)}),
|
||||
"import": (raw) => lib_call.wrap(kind, import_(raw["data"])),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -120,11 +120,11 @@ module mod_vtm
|
|||
function rotate
|
||||
(
|
||||
writer : type_writer,
|
||||
inkrement : int = +1
|
||||
increment : int = +1
|
||||
)
|
||||
: void
|
||||
{
|
||||
writer.direction = mod_direction.add(writer.direction, inkrement);
|
||||
writer.direction = mod_direction.add(writer.direction, increment);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ module mod_vtm
|
|||
kind,
|
||||
{
|
||||
"example": () => lib_call.wrap(kind, example()),
|
||||
"rotate": (actuator, inkrement) => rotate(lib_call.unwrap(actuator), inkrement),
|
||||
"rotate": (actuator, increment) => rotate(lib_call.unwrap(actuator), increment),
|
||||
"use": (actuator, token) => use(lib_call.unwrap(actuator), token),
|
||||
"export": (actuator) => ({"kind": kind, "data": export_(actuator.data)}),
|
||||
"import": (raw) => lib_call.wrap(kind, import_(raw["data"])),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -76,7 +76,7 @@ module mod_vtm
|
|||
/**
|
||||
* @author kcf <vidofnir@folksprak.org>
|
||||
*/
|
||||
export function lauschen
|
||||
export function listen
|
||||
(
|
||||
game : type_game,
|
||||
event : string,
|
||||
|
|
@ -266,11 +266,11 @@ module mod_vtm
|
|||
/**
|
||||
* @author kcf <vidofnir@folksprak.org>
|
||||
*/
|
||||
export function world_tile_wechseln
|
||||
export function world_tile_change
|
||||
(
|
||||
game : type_game,
|
||||
spot : mod_spot.type_spot,
|
||||
umgekehrt : boolean = false
|
||||
inverted : boolean = false
|
||||
)
|
||||
: void
|
||||
{
|
||||
|
|
@ -280,17 +280,17 @@ module mod_vtm
|
|||
}
|
||||
else
|
||||
{
|
||||
mod_world.tile_wechseln(game.world, spot, umgekehrt);
|
||||
mod_world.tile_change(game.world, spot, inverted);
|
||||
notify
|
||||
(
|
||||
game,
|
||||
"change_world",
|
||||
{
|
||||
"kind": "tile_wechseln",
|
||||
"kind": "tile_change",
|
||||
"data":
|
||||
{
|
||||
"spot": spot,
|
||||
"umgekehrt": umgekehrt,
|
||||
"inverted": inverted,
|
||||
"tile": mod_world.tile_get(game.world, spot),
|
||||
}
|
||||
}
|
||||
|
|
@ -307,7 +307,7 @@ module mod_vtm
|
|||
(
|
||||
game : type_game,
|
||||
spot : mod_spot.type_spot,
|
||||
inkrement : int = +1
|
||||
increment : int = +1
|
||||
)
|
||||
: void
|
||||
{
|
||||
|
|
@ -317,7 +317,7 @@ module mod_vtm
|
|||
}
|
||||
else
|
||||
{
|
||||
mod_world.tile_rotate(game.world, spot, inkrement);
|
||||
mod_world.tile_rotate(game.world, spot, increment);
|
||||
notify(game, "change_world", {});
|
||||
}
|
||||
}
|
||||
|
|
@ -346,7 +346,7 @@ module mod_vtm
|
|||
if (! lib_errormonade.filled<mod_token.type_token>(game.token))
|
||||
{
|
||||
let test : mod_test.type_test = mod_task.tests(game.task)[lib_errormonade.read<int>(game.testindex)];
|
||||
let tape : Array<mod_symbol.type_symbol> = mod_vtm.mod_helfer.list_copy<mod_symbol.type_symbol>(mod_test.input(test));
|
||||
let tape : Array<mod_symbol.type_symbol> = lib_list.copy<mod_symbol.type_symbol>(mod_test.input(test));
|
||||
let spot : mod_spot.type_spot = mod_world.generator_finden(game.world);
|
||||
game.token = (
|
||||
lib_errormonade.create_just<mod_token.type_token>
|
||||
|
|
@ -378,12 +378,12 @@ module mod_vtm
|
|||
else if ((state === mod_state.accepted) || (state === mod_state.rejected))
|
||||
{
|
||||
let accepted : boolean = (state === mod_state.accepted);
|
||||
let ausgabe : Array<mod_symbol.type_symbol> = mod_token.tape_read(token);
|
||||
let output : Array<mod_symbol.type_symbol> = mod_token.tape_read(token);
|
||||
game.token = (lib_errormonade.create_nothing<mod_token.type_token>());
|
||||
let testindex : int = lib_errormonade.read<int>(game.testindex);
|
||||
let tests : Array<mod_test.type_test> = mod_task.tests(game.task);
|
||||
let test : mod_test.type_test = tests[testindex];
|
||||
if (! mod_test.pruefen(test, accepted, ausgabe))
|
||||
if (! mod_test.pruefen(test, accepted, output))
|
||||
{
|
||||
game.mode = mod_mode.wrong;
|
||||
notify(game, "change_mode", {});
|
||||
|
|
@ -398,7 +398,7 @@ module mod_vtm
|
|||
}
|
||||
else
|
||||
{
|
||||
// auf Modus "correct" wechseln
|
||||
// auf Modus "correct" change
|
||||
game.testindex = (lib_errormonade.create_nothing<int>());
|
||||
game.mode = mod_mode.correct;
|
||||
notify(game, "change_mode", {});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -34,7 +34,7 @@ module mod_vtm
|
|||
/**
|
||||
* @author kcf <vidofnir@folksprak.org>
|
||||
*/
|
||||
export function vergleichen(symbol1 : type_symbol, symbol2 : type_symbol) : boolean
|
||||
export function collate(symbol1 : type_symbol, symbol2 : type_symbol) : boolean
|
||||
{
|
||||
return (symbol1 === symbol2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -86,7 +86,7 @@ module mod_vtm
|
|||
let gleich : boolean = true;
|
||||
for (let index : int = 0; index < transducertest.output.length; index += 1)
|
||||
{
|
||||
if (! mod_vtm.mod_model.mod_symbol.vergleichen(transducertest.output[index], output[index]))
|
||||
if (! mod_vtm.mod_model.mod_symbol.collate(transducertest.output[index], output[index]))
|
||||
{
|
||||
gleich = false;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Verrückte Turing-Maschinen — A turing complete game
|
||||
* Copyright (C) 2016-2018 Christian Fraß <vidofnir@folksprak.org>
|
||||
* Copyright (C) 2016-2018 kcf <vidofnir@folksprak.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -102,11 +102,11 @@ module mod_vtm
|
|||
/**
|
||||
* @author kcf <vidofnir@folksprak.org>
|
||||
*/
|
||||
export function tile_wechseln
|
||||
export function tile_change
|
||||
(
|
||||
world : type_world,
|
||||
spot : mod_spot.type_spot,
|
||||
umgekehrt : boolean = false
|
||||
inverted : boolean = false
|
||||
)
|
||||
: void
|
||||
{
|
||||
|
|
@ -124,7 +124,7 @@ module mod_vtm
|
|||
)
|
||||
.concat
|
||||
(
|
||||
mod_vtm.mod_helfer.sequence(extended ? 4 : 2).map
|
||||
lib_list.sequence(extended ? 4 : 2).map
|
||||
(
|
||||
symbol => (
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@ module mod_vtm
|
|||
)
|
||||
.concat
|
||||
(
|
||||
mod_vtm.mod_helfer.sequence(extended ? 2 : 1).map
|
||||
lib_list.sequence(extended ? 2 : 1).map
|
||||
(
|
||||
index =>
|
||||
{
|
||||
|
|
@ -226,7 +226,7 @@ module mod_vtm
|
|||
}
|
||||
if (lib_errormonade.filled<int>(index_alt))
|
||||
{
|
||||
let index_neu : int = lib_math.mod(lib_errormonade.read<int>(index_alt) + (umgekehrt ? -1 : +1), liste.length);
|
||||
let index_neu : int = lib_math.mod(lib_errormonade.read<int>(index_alt) + (inverted ? -1 : +1), liste.length);
|
||||
let actuator_neu : mod_actuator.type_actuator = liste[index_neu].erspotr();
|
||||
tile_set(world, spot, actuator_neu);
|
||||
}
|
||||
|
|
@ -246,14 +246,14 @@ module mod_vtm
|
|||
(
|
||||
world : type_world,
|
||||
spot : mod_spot.type_spot,
|
||||
inkrement : int = +1
|
||||
increment : int = +1
|
||||
)
|
||||
: void
|
||||
{
|
||||
let actuator_ : lib_errormonade.type_errormonade<mod_actuator.type_actuator> = lib_hashmap.get(world.tiles, spot);
|
||||
if (lib_errormonade.filled<mod_actuator.type_actuator>(actuator_))
|
||||
{
|
||||
mod_actuator.rotate(lib_errormonade.read<mod_actuator.type_actuator>(actuator_), inkrement);
|
||||
mod_actuator.rotate(lib_errormonade.read<mod_actuator.type_actuator>(actuator_), increment);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue