persistenz mit localstorage - kleiner hack <-)
This commit is contained in:
parent
322407c963
commit
1417d976b8
236
makefile
236
makefile
|
|
@ -1,115 +1,139 @@
|
||||||
all: erzeugnis/vtm.html erzeugnis/vtm.css erzeugnis/aufgaben.dat.js erzeugnis/vtm.js
|
cmd_md := mkdir -p
|
||||||
|
cmd_rm := rm -rf
|
||||||
|
cmd_echo := echo # -e
|
||||||
|
cmd_cp := cp -ruv
|
||||||
|
cmd_cat := cat
|
||||||
|
cmd_tsc := tsc --allowUnreachableCode
|
||||||
|
cmd_sass := sass
|
||||||
|
|
||||||
|
dir_quelldatein := quelldatein
|
||||||
|
dir_erzeugnis := erzeugnis
|
||||||
|
|
||||||
|
all: \
|
||||||
|
${dir_erzeugnis}/vtm.html \
|
||||||
|
${dir_erzeugnis}/vtm.css \
|
||||||
|
${dir_erzeugnis}/vtm.dat.js \
|
||||||
|
${dir_erzeugnis}/vtm.js
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
||||||
clear:
|
clear:
|
||||||
@ echo "-- zurücksetzen …"
|
@ ${cmd_echo} "-- zurücksetzen …"
|
||||||
@ rm -f erzeugnis
|
@ ${cmd_rm} ${dir_erzeugnis}
|
||||||
.PHONY: clear
|
.PHONY: clear
|
||||||
|
|
||||||
erzeugnis/vtm.html: quelldatein/manifestation/web/vtm.html
|
${dir_erzeugnis}/vtm.html: \
|
||||||
@ echo "-- Struktur …"
|
${dir_quelldatein}/manifestation/web/vtm.html
|
||||||
@ mkdir -p erzeugnis
|
@ ${cmd_echo} "-- Struktur …"
|
||||||
@ cp quelldatein/manifestation/web/vtm.html erzeugnis/vtm.html
|
@ ${cmd_md} ${dir_erzeugnis}
|
||||||
|
@ ${cmd_cp} ${dir_quelldatein}/manifestation/web/vtm.html ${dir_erzeugnis}/vtm.html
|
||||||
|
|
||||||
erzeugnis/vtm.css: quelldatein/manifestation/web/vtm.css quelldatein/manifestation/web/partie.css
|
${dir_erzeugnis}/vtm.css: \
|
||||||
@ echo "-- Gestaltung …"
|
${dir_quelldatein}/manifestation/web/vtm.scss \
|
||||||
@ mkdir -p erzeugnis
|
${dir_quelldatein}/manifestation/web/partie.scss
|
||||||
@ cat quelldatein/manifestation/web/vtm.css quelldatein/manifestation/web/partie.css > erzeugnis/vtm.css
|
@ ${cmd_echo} "-- Gestaltung …"
|
||||||
|
@ ${cmd_md} ${dir_erzeugnis}
|
||||||
|
@ ${cmd_cat} \
|
||||||
|
${dir_quelldatein}/manifestation/web/vtm.scss \
|
||||||
|
${dir_quelldatein}/manifestation/web/partie.scss \
|
||||||
|
| ${cmd_sass} --stdin > ${dir_erzeugnis}/vtm.css
|
||||||
|
|
||||||
erzeugnis/aufgaben.dat.js: \
|
${dir_erzeugnis}/vtm.dat.js: \
|
||||||
quelldatein/daten/aufgaben.dat.js \
|
${dir_quelldatein}/daten/aufgaben.dat.js \
|
||||||
quelldatein/daten/zeichenketten/de.dat.js \
|
${dir_quelldatein}/daten/zeichenketten/de.dat.js \
|
||||||
quelldatein/daten/zeichenketten/en.dat.js
|
${dir_quelldatein}/daten/zeichenketten/en.dat.js
|
||||||
@ echo "-- Daten …"
|
@ ${cmd_echo} "-- Daten …"
|
||||||
@ mkdir -p erzeugnis
|
@ ${cmd_md} ${dir_erzeugnis}
|
||||||
@ cat \
|
@ ${cmd_cat} \
|
||||||
quelldatein/daten/aufgaben.dat.js \
|
${dir_quelldatein}/daten/aufgaben.dat.js \
|
||||||
quelldatein/daten/zeichenketten/de.dat.js \
|
${dir_quelldatein}/daten/zeichenketten/de.dat.js \
|
||||||
quelldatein/daten/zeichenketten/en.dat.js \
|
${dir_quelldatein}/daten/zeichenketten/en.dat.js \
|
||||||
> erzeugnis/daten.js
|
> ${dir_erzeugnis}/vtm.dat.js
|
||||||
|
|
||||||
erzeugnis/vtm.js: \
|
${dir_erzeugnis}/vtm.js: \
|
||||||
quelldatein/basis/typen.ts \
|
${dir_quelldatein}/basis/typen.ts \
|
||||||
quelldatein/basis/fehlermonade.ts \
|
${dir_quelldatein}/basis/fehlermonade.ts \
|
||||||
quelldatein/helfer/verschiedenes.ts \
|
${dir_quelldatein}/helfer/verschiedenes.ts \
|
||||||
quelldatein/helfer/mathematik.ts \
|
${dir_quelldatein}/helfer/mathematik.ts \
|
||||||
quelldatein/helfer/vektor.ts \
|
${dir_quelldatein}/helfer/vektor.ts \
|
||||||
quelldatein/helfer/hashmap.ts \
|
${dir_quelldatein}/helfer/hashmap.ts \
|
||||||
quelldatein/helfer/xmlknoten.ts \
|
${dir_quelldatein}/helfer/xmlknoten.ts \
|
||||||
quelldatein/helfer/uebersetzung.ts \
|
${dir_quelldatein}/helfer/uebersetzung.ts \
|
||||||
quelldatein/daten.ts \
|
${dir_quelldatein}/daten.ts \
|
||||||
quelldatein/aufbau/richtung.ts \
|
${dir_quelldatein}/aufbau/richtung.ts \
|
||||||
quelldatein/aufbau/symbol.ts \
|
${dir_quelldatein}/aufbau/symbol.ts \
|
||||||
quelldatein/aufbau/stelle.ts \
|
${dir_quelldatein}/aufbau/stelle.ts \
|
||||||
quelldatein/aufbau/zustand.ts \
|
${dir_quelldatein}/aufbau/zustand.ts \
|
||||||
quelldatein/aufbau/figur.ts \
|
${dir_quelldatein}/aufbau/figur.ts \
|
||||||
quelldatein/aufbau/aktor.ts \
|
${dir_quelldatein}/aufbau/aktor.ts \
|
||||||
quelldatein/aufbau/erzeuger.ts \
|
${dir_quelldatein}/aufbau/erzeuger.ts \
|
||||||
quelldatein/aufbau/befoerderer.ts \
|
${dir_quelldatein}/aufbau/befoerderer.ts \
|
||||||
quelldatein/aufbau/schreiber.ts \
|
${dir_quelldatein}/aufbau/schreiber.ts \
|
||||||
quelldatein/aufbau/leser.ts \
|
${dir_quelldatein}/aufbau/leser.ts \
|
||||||
quelldatein/aufbau/verwerfer.ts \
|
${dir_quelldatein}/aufbau/verwerfer.ts \
|
||||||
quelldatein/aufbau/annehmer.ts \
|
${dir_quelldatein}/aufbau/annehmer.ts \
|
||||||
quelldatein/aufbau/welt.ts \
|
${dir_quelldatein}/aufbau/aktor_.ts \
|
||||||
quelldatein/aufbau/test.ts \
|
${dir_quelldatein}/aufbau/welt.ts \
|
||||||
quelldatein/aufbau/akzeptortest.ts \
|
${dir_quelldatein}/aufbau/test.ts \
|
||||||
quelldatein/aufbau/transduktortest.ts \
|
${dir_quelldatein}/aufbau/akzeptortest.ts \
|
||||||
quelldatein/aufbau/aufgabe.ts \
|
${dir_quelldatein}/aufbau/transduktortest.ts \
|
||||||
quelldatein/aufbau/akzeptoraufgabe.ts \
|
${dir_quelldatein}/aufbau/aufgabe.ts \
|
||||||
quelldatein/aufbau/transduktoraufgabe.ts \
|
${dir_quelldatein}/aufbau/akzeptoraufgabe.ts \
|
||||||
quelldatein/aufbau/aufgabe_.ts \
|
${dir_quelldatein}/aufbau/transduktoraufgabe.ts \
|
||||||
quelldatein/aufbau/modus.ts \
|
${dir_quelldatein}/aufbau/aufgabe_.ts \
|
||||||
quelldatein/aufbau/partie.ts \
|
${dir_quelldatein}/aufbau/modus.ts \
|
||||||
quelldatein/manifestation/manifestation.ts \
|
${dir_quelldatein}/aufbau/partie.ts \
|
||||||
quelldatein/manifestation/position.ts \
|
${dir_quelldatein}/manifestation/manifestation.ts \
|
||||||
quelldatein/manifestation/svg/svg.ts \
|
${dir_quelldatein}/manifestation/position.ts \
|
||||||
quelldatein/manifestation/svg/figur.ts \
|
${dir_quelldatein}/manifestation/svg/svg.ts \
|
||||||
quelldatein/manifestation/svg/aktor.ts \
|
${dir_quelldatein}/manifestation/svg/figur.ts \
|
||||||
quelldatein/manifestation/svg/partie.ts \
|
${dir_quelldatein}/manifestation/svg/aktor.ts \
|
||||||
quelldatein/manifestation/web/partie.ts \
|
${dir_quelldatein}/manifestation/svg/partie.ts \
|
||||||
quelldatein/haupt.ts
|
${dir_quelldatein}/manifestation/web/partie.ts \
|
||||||
@ echo "-- Logik …"
|
${dir_quelldatein}/manifestation/speicher/partie.ts \
|
||||||
@ mkdir -p erzeugnis
|
${dir_quelldatein}/haupt.ts
|
||||||
@ tsc \
|
@ ${cmd_echo} "-- Logik …"
|
||||||
--allowUnreachableCode \
|
@ ${cmd_md} ${dir_erzeugnis}
|
||||||
quelldatein/basis/typen.ts \
|
@ ${cmd_tsc} \
|
||||||
quelldatein/basis/fehlermonade.ts \
|
${dir_quelldatein}/basis/typen.ts \
|
||||||
quelldatein/helfer/verschiedenes.ts \
|
${dir_quelldatein}/basis/fehlermonade.ts \
|
||||||
quelldatein/helfer/mathematik.ts \
|
${dir_quelldatein}/helfer/verschiedenes.ts \
|
||||||
quelldatein/helfer/vektor.ts \
|
${dir_quelldatein}/helfer/mathematik.ts \
|
||||||
quelldatein/helfer/hashmap.ts \
|
${dir_quelldatein}/helfer/vektor.ts \
|
||||||
quelldatein/helfer/xmlknoten.ts \
|
${dir_quelldatein}/helfer/hashmap.ts \
|
||||||
quelldatein/helfer/uebersetzung.ts \
|
${dir_quelldatein}/helfer/xmlknoten.ts \
|
||||||
quelldatein/daten.ts \
|
${dir_quelldatein}/helfer/uebersetzung.ts \
|
||||||
quelldatein/aufbau/richtung.ts \
|
${dir_quelldatein}/daten.ts \
|
||||||
quelldatein/aufbau/symbol.ts \
|
${dir_quelldatein}/aufbau/richtung.ts \
|
||||||
quelldatein/aufbau/stelle.ts \
|
${dir_quelldatein}/aufbau/symbol.ts \
|
||||||
quelldatein/aufbau/zustand.ts \
|
${dir_quelldatein}/aufbau/stelle.ts \
|
||||||
quelldatein/aufbau/figur.ts \
|
${dir_quelldatein}/aufbau/zustand.ts \
|
||||||
quelldatein/aufbau/aktor.ts \
|
${dir_quelldatein}/aufbau/figur.ts \
|
||||||
quelldatein/aufbau/erzeuger.ts \
|
${dir_quelldatein}/aufbau/aktor.ts \
|
||||||
quelldatein/aufbau/befoerderer.ts \
|
${dir_quelldatein}/aufbau/erzeuger.ts \
|
||||||
quelldatein/aufbau/schreiber.ts \
|
${dir_quelldatein}/aufbau/befoerderer.ts \
|
||||||
quelldatein/aufbau/leser.ts \
|
${dir_quelldatein}/aufbau/schreiber.ts \
|
||||||
quelldatein/aufbau/verwerfer.ts \
|
${dir_quelldatein}/aufbau/leser.ts \
|
||||||
quelldatein/aufbau/annehmer.ts \
|
${dir_quelldatein}/aufbau/verwerfer.ts \
|
||||||
quelldatein/aufbau/welt.ts \
|
${dir_quelldatein}/aufbau/annehmer.ts \
|
||||||
quelldatein/aufbau/test.ts \
|
${dir_quelldatein}/aufbau/aktor_.ts \
|
||||||
quelldatein/aufbau/akzeptortest.ts \
|
${dir_quelldatein}/aufbau/welt.ts \
|
||||||
quelldatein/aufbau/transduktortest.ts \
|
${dir_quelldatein}/aufbau/test.ts \
|
||||||
quelldatein/aufbau/aufgabe.ts \
|
${dir_quelldatein}/aufbau/akzeptortest.ts \
|
||||||
quelldatein/aufbau/akzeptoraufgabe.ts \
|
${dir_quelldatein}/aufbau/transduktortest.ts \
|
||||||
quelldatein/aufbau/transduktoraufgabe.ts \
|
${dir_quelldatein}/aufbau/aufgabe.ts \
|
||||||
quelldatein/aufbau/aufgabe_.ts \
|
${dir_quelldatein}/aufbau/akzeptoraufgabe.ts \
|
||||||
quelldatein/aufbau/modus.ts \
|
${dir_quelldatein}/aufbau/transduktoraufgabe.ts \
|
||||||
quelldatein/aufbau/partie.ts \
|
${dir_quelldatein}/aufbau/aufgabe_.ts \
|
||||||
quelldatein/manifestation/manifestation.ts \
|
${dir_quelldatein}/aufbau/modus.ts \
|
||||||
quelldatein/manifestation/position.ts \
|
${dir_quelldatein}/aufbau/partie.ts \
|
||||||
quelldatein/manifestation/svg/svg.ts \
|
${dir_quelldatein}/manifestation/manifestation.ts \
|
||||||
quelldatein/manifestation/svg/figur.ts \
|
${dir_quelldatein}/manifestation/position.ts \
|
||||||
quelldatein/manifestation/svg/aktor.ts \
|
${dir_quelldatein}/manifestation/svg/svg.ts \
|
||||||
quelldatein/manifestation/svg/partie.ts \
|
${dir_quelldatein}/manifestation/svg/figur.ts \
|
||||||
quelldatein/manifestation/web/partie.ts \
|
${dir_quelldatein}/manifestation/svg/aktor.ts \
|
||||||
quelldatein/haupt.ts \
|
${dir_quelldatein}/manifestation/svg/partie.ts \
|
||||||
--outFile erzeugnis/vtm.js
|
${dir_quelldatein}/manifestation/web/partie.ts \
|
||||||
|
${dir_quelldatein}/manifestation/speicher/partie.ts \
|
||||||
|
${dir_quelldatein}/haupt.ts \
|
||||||
|
--outFile ${dir_erzeugnis}/vtm.js
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,18 @@ module mod_vtm_aufbau
|
||||||
*/
|
*/
|
||||||
verwenden(figur : klasse_figur) : void;
|
verwenden(figur : klasse_figur) : void;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
exportieren() : any;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
// static importieren(roh : any) : schnittstelle_aktor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
124
quelldatein/aufbau/aktor_.ts
Normal file
124
quelldatein/aufbau/aktor_.ts
Normal file
|
|
@ -0,0 +1,124 @@
|
||||||
|
/*
|
||||||
|
* Verrückte Turing-Maschinen — A turing complete game
|
||||||
|
* Copyright (C) 2016 Christian Fraß <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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module mod_vtm_aufbau
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
export function aktor_exportieren(aktor : schnittstelle_aktor) : any
|
||||||
|
{
|
||||||
|
if (aktor instanceof klasse_erzeuger)
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
"art": "erzeuger",
|
||||||
|
"angaben": aktor.exportieren()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if (aktor instanceof klasse_annehmer)
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
"art": "annehmer",
|
||||||
|
"angaben": aktor.exportieren()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if (aktor instanceof klasse_verwerfer)
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
"art": "verwerfer",
|
||||||
|
"angaben": aktor.exportieren()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if (aktor instanceof klasse_befoerderer)
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
"art": "befoerderer",
|
||||||
|
"angaben": aktor.exportieren()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if (aktor instanceof klasse_schreiber)
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
"art": "schreiber",
|
||||||
|
"angaben": aktor.exportieren()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else if (aktor instanceof klasse_leser)
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
"art": "leser",
|
||||||
|
"angaben": aktor.exportieren()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
let meldung : string = "unbehandelte Klasse";
|
||||||
|
throw (new Error(meldung));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
export function aktor_importieren(aktor_roh : any) : schnittstelle_aktor
|
||||||
|
{
|
||||||
|
switch (aktor_roh["art"])
|
||||||
|
{
|
||||||
|
case "erzeuger":
|
||||||
|
{
|
||||||
|
return klasse_erzeuger.importieren(aktor_roh["angaben"]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "annehmer":
|
||||||
|
{
|
||||||
|
return klasse_annehmer.importieren(aktor_roh["angaben"]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "verwerfer":
|
||||||
|
{
|
||||||
|
return klasse_verwerfer.importieren(aktor_roh["angaben"]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "befoerderer":
|
||||||
|
{
|
||||||
|
return klasse_befoerderer.importieren(aktor_roh["angaben"]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "schreiber":
|
||||||
|
{
|
||||||
|
return klasse_schreiber.importieren(aktor_roh["angaben"]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "leser":
|
||||||
|
{
|
||||||
|
return klasse_leser.importieren(aktor_roh["angaben"]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
let meldung : string = "unbehandelte Art";
|
||||||
|
throw (new Error(meldung));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -26,6 +26,12 @@ module mod_vtm_aufbau
|
||||||
implements schnittstelle_aufgabe
|
implements schnittstelle_aufgabe
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
private id : string;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
*/
|
*/
|
||||||
|
|
@ -47,14 +53,25 @@ module mod_vtm_aufbau
|
||||||
/**
|
/**
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
*/
|
*/
|
||||||
public constructor(titel : string, text : string, tests : Array<klasse_akzeptortest>)
|
public constructor(id : string, titel : string, text : string, tests : Array<klasse_akzeptortest>)
|
||||||
{
|
{
|
||||||
|
this.id = id;
|
||||||
this.titel_ = titel;
|
this.titel_ = titel;
|
||||||
this.text_ = text;
|
this.text_ = text;
|
||||||
this.tests_ = tests;
|
this.tests_ = tests;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public id_lesen() : string
|
||||||
|
{
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
* @implementation
|
* @implementation
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,31 @@ module mod_vtm_aufbau
|
||||||
figur.annehmen();
|
figur.annehmen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public exportieren() : any
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public static importieren(roh : any) : klasse_annehmer
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
new klasse_annehmer
|
||||||
|
(
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,12 @@ module mod_vtm_aufbau
|
||||||
export interface schnittstelle_aufgabe
|
export interface schnittstelle_aufgabe
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
id_lesen() : string;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ module mod_vtm_aufbau
|
||||||
return (
|
return (
|
||||||
new klasse_akzeptoraufgabe
|
new klasse_akzeptoraufgabe
|
||||||
(
|
(
|
||||||
|
aufgabe_roh["id"],
|
||||||
aufgabe_roh["parameter"]["titel"],
|
aufgabe_roh["parameter"]["titel"],
|
||||||
aufgabe_roh["parameter"]["text"],
|
aufgabe_roh["parameter"]["text"],
|
||||||
aufgabe_roh["parameter"]["tests"].map
|
aufgabe_roh["parameter"]["tests"].map
|
||||||
|
|
@ -52,6 +53,7 @@ module mod_vtm_aufbau
|
||||||
return (
|
return (
|
||||||
new klasse_transduktoraufgabe
|
new klasse_transduktoraufgabe
|
||||||
(
|
(
|
||||||
|
aufgabe_roh["id"],
|
||||||
aufgabe_roh["parameter"]["titel"],
|
aufgabe_roh["parameter"]["titel"],
|
||||||
aufgabe_roh["parameter"]["text"],
|
aufgabe_roh["parameter"]["text"],
|
||||||
aufgabe_roh["parameter"]["tests"].map
|
aufgabe_roh["parameter"]["tests"].map
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,33 @@ module mod_vtm_aufbau
|
||||||
figur.bewegen(this.richtung);
|
figur.bewegen(this.richtung);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public exportieren() : any
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
"richtung": richtung_exportieren(this.richtung),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public static importieren(roh : any) : klasse_befoerderer
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
new klasse_befoerderer
|
||||||
|
(
|
||||||
|
richtung_importieren(roh["richtung"])
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,33 @@ module mod_vtm_aufbau
|
||||||
figur.bewegen(this.richtung);
|
figur.bewegen(this.richtung);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public exportieren() : any
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
"richtung": richtung_exportieren(this.richtung),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public static importieren(roh : any) : klasse_erzeuger
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
new klasse_erzeuger
|
||||||
|
(
|
||||||
|
richtung_importieren(roh["richtung"])
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,37 @@ module mod_vtm_aufbau
|
||||||
figur.bewegen(richtung);
|
figur.bewegen(richtung);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public exportieren() : any
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
"richtung": richtung_exportieren(this.richtung),
|
||||||
|
"symbol_links": symbol_exportieren(this.symbol_links),
|
||||||
|
"symbol_rechts": symbol_exportieren(this.symbol_rechts),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public static importieren(roh : any) : klasse_leser
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
new klasse_leser
|
||||||
|
(
|
||||||
|
richtung_importieren(roh["richtung"]),
|
||||||
|
symbol_importieren(roh["symbol_links"]),
|
||||||
|
symbol_importieren(roh["symbol_rechts"])
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,22 +122,6 @@ module mod_vtm_aufbau
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
|
||||||
*/
|
|
||||||
public welt_leeren(bescheid_geben : boolean = true) : void
|
|
||||||
{
|
|
||||||
this.welt = klasse_welt.blanko();
|
|
||||||
if (bescheid_geben)
|
|
||||||
{
|
|
||||||
this.benachrichtigen("aenderung_welt", {});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// nichts tun
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
*/
|
*/
|
||||||
|
|
@ -173,7 +157,7 @@ module mod_vtm_aufbau
|
||||||
public aufgabe_setzen(aufgabe : schnittstelle_aufgabe) : void
|
public aufgabe_setzen(aufgabe : schnittstelle_aufgabe) : void
|
||||||
{
|
{
|
||||||
this.aufgabe = aufgabe;
|
this.aufgabe = aufgabe;
|
||||||
this.welt_leeren();
|
// this.welt_leeren();
|
||||||
this.benachrichtigen("aenderung_aufgabe", {});
|
this.benachrichtigen("aenderung_aufgabe", {});
|
||||||
this.zuruecksetzen();
|
this.zuruecksetzen();
|
||||||
}
|
}
|
||||||
|
|
@ -188,6 +172,40 @@ module mod_vtm_aufbau
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
public welt_setzen(welt : mod_vtm_aufbau.klasse_welt, bescheid_geben : boolean = true) : void
|
||||||
|
{
|
||||||
|
this.welt = welt;
|
||||||
|
if (bescheid_geben)
|
||||||
|
{
|
||||||
|
this.benachrichtigen("aenderung_welt", {});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// nichts tun
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
public welt_leeren(bescheid_geben : boolean = true) : void
|
||||||
|
{
|
||||||
|
this.welt = klasse_welt.blanko();
|
||||||
|
if (bescheid_geben)
|
||||||
|
{
|
||||||
|
this.benachrichtigen("aenderung_welt", {});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// nichts tun
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
*/
|
*/
|
||||||
|
|
@ -218,7 +236,20 @@ module mod_vtm_aufbau
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.welt.feld_wechseln(stelle, umgekehrt);
|
this.welt.feld_wechseln(stelle, umgekehrt);
|
||||||
this.benachrichtigen("aenderung_welt", {});
|
this.benachrichtigen
|
||||||
|
(
|
||||||
|
"aenderung_welt",
|
||||||
|
{
|
||||||
|
"art": "feld_wechseln",
|
||||||
|
"angaben":
|
||||||
|
{
|
||||||
|
"stelle": stelle,
|
||||||
|
"umgekehrt": umgekehrt,
|
||||||
|
"feld": this.welt.feld_holen(stelle),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -341,7 +372,7 @@ module mod_vtm_aufbau
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,5 +33,23 @@ module mod_vtm_aufbau
|
||||||
return mod_vtm_helfer.mod(richtung1 + richtung2, 6);
|
return mod_vtm_helfer.mod(richtung1 + richtung2, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
export function richtung_exportieren(richtung : typ_richtung) : int
|
||||||
|
{
|
||||||
|
return richtung;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
export function richtung_importieren(richtung_ : int) : typ_richtung
|
||||||
|
{
|
||||||
|
return richtung_;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,35 @@ module mod_vtm_aufbau
|
||||||
figur.bewegen(this.richtung);
|
figur.bewegen(this.richtung);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public exportieren() : any
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
"richtung": richtung_exportieren(this.richtung),
|
||||||
|
"symbol": symbol_exportieren(this.symbol),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public static importieren(roh : any) : klasse_schreiber
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
new klasse_schreiber
|
||||||
|
(
|
||||||
|
richtung_importieren(roh["richtung"]),
|
||||||
|
symbol_importieren(roh["symbol"])
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,24 @@ module mod_vtm_aufbau
|
||||||
{
|
{
|
||||||
return {"u": (stelle1.u + stelle2.u), "v": (stelle1.v + stelle2.v)};
|
return {"u": (stelle1.u + stelle2.u), "v": (stelle1.v + stelle2.v)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
export function stelle_exportieren(stelle : typ_stelle) : string
|
||||||
|
{
|
||||||
|
return stelle_hash(stelle);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
export function stelle_importieren(stelle_ : string) : typ_stelle
|
||||||
|
{
|
||||||
|
return stelle_von_hash(stelle_);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,5 +33,23 @@ module mod_vtm_aufbau
|
||||||
return (symbol1 === symbol2);
|
return (symbol1 === symbol2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
export function symbol_exportieren(symbol : typ_symbol) : int
|
||||||
|
{
|
||||||
|
return symbol;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
export function symbol_importieren(symbol_ : int) : typ_symbol
|
||||||
|
{
|
||||||
|
return symbol_;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,12 @@ module mod_vtm_aufbau
|
||||||
implements schnittstelle_aufgabe
|
implements schnittstelle_aufgabe
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
private id : string;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
*/
|
*/
|
||||||
|
|
@ -47,14 +53,25 @@ module mod_vtm_aufbau
|
||||||
/**
|
/**
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
*/
|
*/
|
||||||
public constructor(titel : string, text : string, tests : Array<klasse_transduktortest>)
|
public constructor(id : string, titel : string, text : string, tests : Array<klasse_transduktortest>)
|
||||||
{
|
{
|
||||||
|
this.id = id;
|
||||||
this.titel_ = titel;
|
this.titel_ = titel;
|
||||||
this.text_ = text;
|
this.text_ = text;
|
||||||
this.tests_ = tests;
|
this.tests_ = tests;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public id_lesen() : string
|
||||||
|
{
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kcf <vidofnir@folksprak.org>
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
* @implementation
|
* @implementation
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,31 @@ module mod_vtm_aufbau
|
||||||
figur.verwerfen();
|
figur.verwerfen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public exportieren() : any
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public static importieren(roh : any) : klasse_verwerfer
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
new klasse_verwerfer
|
||||||
|
(
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ module mod_vtm_aufbau
|
||||||
*/
|
*/
|
||||||
public constructor
|
public constructor
|
||||||
(
|
(
|
||||||
felder : mod_vtm_helfer.klasse_hashmap<typ_stelle, schnittstelle_aktor> = new mod_vtm_helfer.klasse_hashmap<typ_stelle, schnittstelle_aktor>(stelle_hash)
|
felder : mod_vtm_helfer.klasse_hashmap<typ_stelle, schnittstelle_aktor> = (new mod_vtm_helfer.klasse_hashmap<typ_stelle, schnittstelle_aktor>(stelle_hash))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.felder = felder;
|
this.felder = felder;
|
||||||
|
|
@ -298,6 +298,50 @@ module mod_vtm_aufbau
|
||||||
}
|
}
|
||||||
return welt;
|
return welt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
public exportieren() : any
|
||||||
|
{
|
||||||
|
let roh : any = {};
|
||||||
|
roh["felder"] = {};
|
||||||
|
this.felder.iterieren
|
||||||
|
(
|
||||||
|
(stelle, aktor) =>
|
||||||
|
{
|
||||||
|
let stelle_ : string = stelle_exportieren(stelle);
|
||||||
|
let aktor_ : any = aktor_exportieren(aktor);
|
||||||
|
roh["felder"][stelle_] = aktor_;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
;
|
||||||
|
return roh;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
public static importieren(roh : any) : klasse_welt
|
||||||
|
{
|
||||||
|
let felder : mod_vtm_helfer.klasse_hashmap<typ_stelle, schnittstelle_aktor> = (new mod_vtm_helfer.klasse_hashmap<typ_stelle, schnittstelle_aktor>(stelle_hash));
|
||||||
|
for (let stelle_ in roh["felder"])
|
||||||
|
{
|
||||||
|
let stelle : typ_stelle = stelle_importieren(stelle_);
|
||||||
|
let aktor_ : schnittstelle_aktor = roh["felder"][stelle_];
|
||||||
|
let aktor : schnittstelle_aktor = aktor_importieren(aktor_);
|
||||||
|
felder.setzen(stelle, aktor);
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
new klasse_welt
|
||||||
|
(
|
||||||
|
felder
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ jsonp_behandlung(
|
||||||
"schluessel": "aufgaben",
|
"schluessel": "aufgaben",
|
||||||
"wert": [
|
"wert": [
|
||||||
{
|
{
|
||||||
|
"id": "einfuehrung",
|
||||||
"art": "akzeptor",
|
"art": "akzeptor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "Einführung",
|
"titel": "Einführung",
|
||||||
|
|
@ -16,6 +17,7 @@ jsonp_behandlung(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "start_symbol",
|
||||||
"art": "akzeptor",
|
"art": "akzeptor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "Start-Symbol",
|
"titel": "Start-Symbol",
|
||||||
|
|
@ -45,6 +47,7 @@ jsonp_behandlung(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "dreifaltigkeit",
|
||||||
"art": "akzeptor",
|
"art": "akzeptor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "Dreifaltigkeit",
|
"titel": "Dreifaltigkeit",
|
||||||
|
|
@ -66,6 +69,7 @@ jsonp_behandlung(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "abwechslung_erfreuet",
|
||||||
"art": "akzeptor",
|
"art": "akzeptor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "Abwechslung erfreuet",
|
"titel": "Abwechslung erfreuet",
|
||||||
|
|
@ -95,6 +99,7 @@ jsonp_behandlung(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "ans_ende",
|
||||||
"art": "transduktor",
|
"art": "transduktor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "Ans Ende",
|
"titel": "Ans Ende",
|
||||||
|
|
@ -108,6 +113,7 @@ jsonp_behandlung(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "tauschen",
|
||||||
"art": "transduktor",
|
"art": "transduktor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "Tauschen",
|
"titel": "Tauschen",
|
||||||
|
|
@ -125,10 +131,11 @@ jsonp_behandlung(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "waehlerisch",
|
||||||
"art": "transduktor",
|
"art": "transduktor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "Wählerisch",
|
"titel": "Wählerisch",
|
||||||
"text": "aus der Eingabe (${s0} / ${s1}) alle ${s0} entfernen und alle ${s1} beibehalten",
|
"text": "aus der Eingabe alle ${s0} entfernen und alle ${s1} beibehalten",
|
||||||
"tests": [
|
"tests": [
|
||||||
{
|
{
|
||||||
"eingabe": [0,0,0,1,0],
|
"eingabe": [0,0,0,1,0],
|
||||||
|
|
@ -150,6 +157,7 @@ jsonp_behandlung(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "dekorator",
|
||||||
"art": "transduktor",
|
"art": "transduktor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "Dekorator",
|
"titel": "Dekorator",
|
||||||
|
|
@ -167,10 +175,11 @@ jsonp_behandlung(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "alpha_und_omega",
|
||||||
"art": "akzeptor",
|
"art": "akzeptor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "Alpha und Omega",
|
"titel": "Alpha und Omega",
|
||||||
"text": "Eingaben(${s0} / ${s1}), die mit den gleichen Symbolen anfangen und enden",
|
"text": "Eingaben (${s0} / ${s1}), die mit den gleichen Symbolen anfangen und enden",
|
||||||
"tests": [
|
"tests": [
|
||||||
{
|
{
|
||||||
"eingabe": [],
|
"eingabe": [],
|
||||||
|
|
@ -200,6 +209,7 @@ jsonp_behandlung(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "an_den_anfang",
|
||||||
"art": "transduktor",
|
"art": "transduktor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "An den Anfang",
|
"titel": "An den Anfang",
|
||||||
|
|
@ -213,6 +223,7 @@ jsonp_behandlung(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": "a_n_b_n",
|
||||||
"art": "akzeptor",
|
"art": "akzeptor",
|
||||||
"parameter": {
|
"parameter": {
|
||||||
"titel": "a^n b^n",
|
"titel": "a^n b^n",
|
||||||
|
|
@ -238,6 +249,9 @@ jsonp_behandlung(
|
||||||
"eingabe": [0,0,0,0,0,0,0,1,1,1,1,1,1,1],
|
"eingabe": [0,0,0,0,0,0,0,1,1,1,1,1,1,1],
|
||||||
"annehmen": true
|
"annehmen": true
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"hinweise": [
|
||||||
|
"Ein Wort ist genau dann Element der Sprache ${s0}^n ${s1}^n, wenn sie entweder 1) leer ist (also n = 0 gilt) oder 2) sie mit ${s0} beginnt, mit ${s1} endet und dazwischen ein Wort der Form ${s0}^(n-1) ${s1}^(n-1) steht … Stichwort: Rekursion"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ function aufgaben_eintragen(behandler : (aufgabe : mod_vtm_aufbau.schnittstelle_
|
||||||
{
|
{
|
||||||
let praefix : string = (
|
let praefix : string = (
|
||||||
{
|
{
|
||||||
"akzeptor": "AKZ",
|
"akzeptor": mod_vtm_helfer.uebersetzung_holen("aufbau.aufgaben.arten.akzeptor.kuerzel"),
|
||||||
"transduktor": "TRA",
|
"transduktor": mod_vtm_helfer.uebersetzung_holen("aufbau.aufgaben.arten.transduktor.kuerzel"),
|
||||||
}[aufgabe_roh["art"]]
|
}[aufgabe_roh["art"]]
|
||||||
);
|
);
|
||||||
let titel : string = ("[" + praefix + "]" + " " + aufgabe_roh["parameter"]["titel"]);
|
let titel : string = ("[" + praefix + "]" + " " + aufgabe_roh["parameter"]["titel"]);
|
||||||
|
|
@ -78,7 +78,7 @@ function aufgaben_eintragen(behandler : (aufgabe : mod_vtm_aufbau.schnittstelle_
|
||||||
*/
|
*/
|
||||||
function haupt() : void
|
function haupt() : void
|
||||||
{
|
{
|
||||||
// uebersetzungen
|
// Übersetzungen
|
||||||
{
|
{
|
||||||
let sprachen : Array<string> = navigator.languages.map(sprache => sprache);
|
let sprachen : Array<string> = navigator.languages.map(sprache => sprache);
|
||||||
let sprache_nativ : string = "de";
|
let sprache_nativ : string = "de";
|
||||||
|
|
@ -87,9 +87,9 @@ function haupt() : void
|
||||||
mod_vtm_helfer.uebersetzung_einrichten(sprachen);
|
mod_vtm_helfer.uebersetzung_einrichten(sprachen);
|
||||||
mod_vtm_helfer.uebersetzung_anwenden(document);
|
mod_vtm_helfer.uebersetzung_anwenden(document);
|
||||||
}
|
}
|
||||||
// hilfe
|
// Hilfe
|
||||||
{
|
{
|
||||||
// einleitung
|
// Einleitung
|
||||||
{
|
{
|
||||||
document.querySelector("#hilfe_einleitung").innerHTML = (
|
document.querySelector("#hilfe_einleitung").innerHTML = (
|
||||||
mod_vtm_helfer.uebersetzung_holen
|
mod_vtm_helfer.uebersetzung_holen
|
||||||
|
|
@ -103,9 +103,9 @@ function haupt() : void
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// aktoren
|
// Aktoren
|
||||||
{
|
{
|
||||||
// arten
|
// Arten
|
||||||
{
|
{
|
||||||
let von_x : float = -0.5;
|
let von_x : float = -0.5;
|
||||||
let von_y : float = -0.5;
|
let von_y : float = -0.5;
|
||||||
|
|
@ -116,27 +116,27 @@ function haupt() : void
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"aufbau": (new mod_vtm_aufbau.klasse_erzeuger()),
|
"aufbau": (new mod_vtm_aufbau.klasse_erzeuger()),
|
||||||
"kontext": document.querySelector("#hilfe_aktoren_aktor_erzeuger"),
|
"bereich": document.querySelector("#hilfe_aktoren_aktor_erzeuger"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aufbau": (new mod_vtm_aufbau.klasse_annehmer()),
|
"aufbau": (new mod_vtm_aufbau.klasse_annehmer()),
|
||||||
"kontext": document.querySelector("#hilfe_aktoren_aktor_annehmer"),
|
"bereich": document.querySelector("#hilfe_aktoren_aktor_annehmer"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aufbau": (new mod_vtm_aufbau.klasse_verwerfer()),
|
"aufbau": (new mod_vtm_aufbau.klasse_verwerfer()),
|
||||||
"kontext": document.querySelector("#hilfe_aktoren_aktor_verwerfer"),
|
"bereich": document.querySelector("#hilfe_aktoren_aktor_verwerfer"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aufbau": (new mod_vtm_aufbau.klasse_befoerderer()),
|
"aufbau": (new mod_vtm_aufbau.klasse_befoerderer()),
|
||||||
"kontext": document.querySelector("#hilfe_aktoren_aktor_befoerderer"),
|
"bereich": document.querySelector("#hilfe_aktoren_aktor_befoerderer"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aufbau": (new mod_vtm_aufbau.klasse_schreiber()),
|
"aufbau": (new mod_vtm_aufbau.klasse_schreiber()),
|
||||||
"kontext": document.querySelector("#hilfe_aktoren_aktor_schreiber"),
|
"bereich": document.querySelector("#hilfe_aktoren_aktor_schreiber"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aufbau": (new mod_vtm_aufbau.klasse_leser()),
|
"aufbau": (new mod_vtm_aufbau.klasse_leser()),
|
||||||
"kontext": document.querySelector("#hilfe_aktoren_aktor_leser"),
|
"bereich": document.querySelector("#hilfe_aktoren_aktor_leser"),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
.forEach
|
.forEach
|
||||||
|
|
@ -145,14 +145,14 @@ function haupt() : void
|
||||||
{
|
{
|
||||||
let manifestor = (new mod_vtm_manifestation.klasse_svg_aktor(eintrag.aufbau, mod_vtm_aufbau.stelle_null()));
|
let manifestor = (new mod_vtm_manifestation.klasse_svg_aktor(eintrag.aufbau, mod_vtm_aufbau.stelle_null()));
|
||||||
let xmlknoten : mod_vtm_helfer.schnittstelle_xmlknoten = mod_vtm_manifestation.svg_wurzel(von_x, von_y, bis_x, bis_y, breite, hoehe, [manifestor.darstellen()]);
|
let xmlknoten : mod_vtm_helfer.schnittstelle_xmlknoten = mod_vtm_manifestation.svg_wurzel(von_x, von_y, bis_x, bis_y, breite, hoehe, [manifestor.darstellen()]);
|
||||||
eintrag.kontext.querySelector(".hilfe_aktoren_aktor_bild").innerHTML = xmlknoten.darstellen();
|
eintrag.bereich.querySelector(".hilfe_aktoren_aktor_bild").innerHTML = xmlknoten.darstellen();
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// spiel
|
// Spiel
|
||||||
{
|
{
|
||||||
let aufbau : mod_vtm_aufbau.klasse_partie;
|
let aufbau : mod_vtm_aufbau.klasse_partie;
|
||||||
aufgaben_eintragen
|
aufgaben_eintragen
|
||||||
|
|
@ -162,6 +162,7 @@ function haupt() : void
|
||||||
;
|
;
|
||||||
aufbau = (new mod_vtm_aufbau.klasse_partie(mod_vtm_aufbau.aufgabe_holen(0)));
|
aufbau = (new mod_vtm_aufbau.klasse_partie(mod_vtm_aufbau.aufgabe_holen(0)));
|
||||||
(new mod_vtm_manifestation.klasse_web_partie(aufbau, document.querySelector("#bereich_mitte"))).einrichten();
|
(new mod_vtm_manifestation.klasse_web_partie(aufbau, document.querySelector("#bereich_mitte"))).einrichten();
|
||||||
|
(new mod_vtm_manifestation.klasse_speicher_partie(aufbau)).einrichten();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
124
quelldatein/manifestation/speicher/partie.ts
Normal file
124
quelldatein/manifestation/speicher/partie.ts
Normal file
|
|
@ -0,0 +1,124 @@
|
||||||
|
/*
|
||||||
|
* Verrückte Turing-Maschinen — A turing complete game
|
||||||
|
* Copyright (C) 2016 Christian Fraß <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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
module mod_vtm_manifestation
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
export class klasse_speicher_partie
|
||||||
|
extends klasse_manifestation<mod_vtm_aufbau.klasse_partie, void>
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
*/
|
||||||
|
public constructor(aufbau : mod_vtm_aufbau.klasse_partie)
|
||||||
|
{
|
||||||
|
super(aufbau);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
public einrichten() : void
|
||||||
|
{
|
||||||
|
this.aufbau.lauschen
|
||||||
|
(
|
||||||
|
"aenderung_aufgabe",
|
||||||
|
(angaben) =>
|
||||||
|
{
|
||||||
|
// console.info("aenderung_aufgabe", angaben);
|
||||||
|
let id : string = this.aufbau.aufgabe_lesen().id_lesen();
|
||||||
|
let key : string = ("vtm_" + id);
|
||||||
|
if (key in localStorage)
|
||||||
|
{
|
||||||
|
let item : string = localStorage.getItem(key);
|
||||||
|
let welt : mod_vtm_aufbau.klasse_welt = mod_vtm_aufbau.klasse_welt.importieren(JSON.parse(item));
|
||||||
|
this.aufbau.welt_setzen(welt, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.aufbau.welt_leeren();
|
||||||
|
// nichts tun
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
;
|
||||||
|
this.aufbau.lauschen
|
||||||
|
(
|
||||||
|
"aenderung_welt",
|
||||||
|
(angaben) =>
|
||||||
|
{
|
||||||
|
let id : string = this.aufbau.aufgabe_lesen().id_lesen();
|
||||||
|
let key : string = ("vtm_" + id);
|
||||||
|
let item : string = JSON.stringify(this.aufbau.welt_lesen().exportieren());
|
||||||
|
localStorage.setItem(key, item);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
;
|
||||||
|
this.aufbau.lauschen
|
||||||
|
(
|
||||||
|
"aenderung_figur",
|
||||||
|
(angaben) =>
|
||||||
|
{
|
||||||
|
// console.info("aenderung_figur", angaben);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
;
|
||||||
|
this.aufbau.lauschen
|
||||||
|
(
|
||||||
|
"aenderung_modus",
|
||||||
|
(angaben) =>
|
||||||
|
{
|
||||||
|
// console.info("aenderung_modus", angaben);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
;
|
||||||
|
this.darstellen();
|
||||||
|
this.binden();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public darstellen() : void
|
||||||
|
{
|
||||||
|
console.warn("empty");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kcf <vidofnir@folksprak.org>
|
||||||
|
* @implementation
|
||||||
|
*/
|
||||||
|
public binden() : void
|
||||||
|
{
|
||||||
|
console.warn("empty");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
.rahmen
|
|
||||||
{
|
|
||||||
stroke: none;
|
|
||||||
fill: hsl( 0, 0%, 25%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.rahmen:hover
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
fill: hsl( 0, 0%, 37.5%);
|
|
||||||
transition: 0.25s ease;
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
.figur
|
|
||||||
{
|
|
||||||
stroke: none;
|
|
||||||
fill: hsl( 0, 0%, 0%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pfeil
|
|
||||||
{
|
|
||||||
stroke: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.erzeuger
|
|
||||||
{
|
|
||||||
fill: hsl( 0, 0%, 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.neutral
|
|
||||||
{
|
|
||||||
fill: hsl( 0, 0%, 50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.symbol_0
|
|
||||||
{
|
|
||||||
fill: hsl(000.0000000000000, 50%, 50%);
|
|
||||||
background-color: hsl(000.0000000000000, 50%, 50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.symbol_1
|
|
||||||
{
|
|
||||||
fill: hsl(222.4922359499621, 50%, 50%);
|
|
||||||
background-color: hsl(222.4922359499621, 50%, 50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.symbol_2
|
|
||||||
{
|
|
||||||
fill: hsl(084.9844718999243, 50%, 50%);
|
|
||||||
background-color: hsl(084.9844718999243, 50%, 50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.symbol_3
|
|
||||||
{
|
|
||||||
fill: hsl(307.4767078498864, 50%, 50%);
|
|
||||||
background-color: hsl(307.4767078498864, 50%, 50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.kreis
|
|
||||||
{
|
|
||||||
stroke: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.positiv
|
|
||||||
{
|
|
||||||
fill: hsl( 0, 0%, 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.negativ
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
fill: hsl( 0, 0%, 0%);
|
|
||||||
*/
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.eintrag
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
stroke: black;
|
|
||||||
stroke-width: 0.01;
|
|
||||||
*/
|
|
||||||
stroke: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
122
quelldatein/manifestation/web/partie.scss
Normal file
122
quelldatein/manifestation/web/partie.scss
Normal file
|
|
@ -0,0 +1,122 @@
|
||||||
|
/*
|
||||||
|
* Verrückte Turing-Maschinen — A turing complete game
|
||||||
|
* Copyright (C) 2016 Christian Fraß <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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$phi: 0.6180339887498949;
|
||||||
|
|
||||||
|
/*
|
||||||
|
$farbton_symbol_0: 000.0000000000000;
|
||||||
|
$farbton_symbol_1: 222.4922359499621;
|
||||||
|
$farbton_symbol_2: 084.9844718999243;
|
||||||
|
$farbton_symbol_3: 307.4767078498864;
|
||||||
|
*/
|
||||||
|
|
||||||
|
$offset: 0;
|
||||||
|
$farbton_symbol_0: ((($phi*($offset+0))%1)*360);
|
||||||
|
$farbton_symbol_1: ((($phi*($offset+1))%1)*360);
|
||||||
|
$farbton_symbol_2: ((($phi*($offset+2))%1)*360);
|
||||||
|
$farbton_symbol_3: ((($phi*($offset+3))%1)*360);
|
||||||
|
|
||||||
|
$saettigung_symbol: 50%;
|
||||||
|
$helligkeit_symbol: 50%;
|
||||||
|
|
||||||
|
.rahmen
|
||||||
|
{
|
||||||
|
stroke: none;
|
||||||
|
fill: hsl( 0, 0%, 25%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rahmen:hover
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
fill: hsl( 0, 0%, 37.5%);
|
||||||
|
transition: 0.25s ease;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.figur
|
||||||
|
{
|
||||||
|
stroke: none;
|
||||||
|
fill: hsl( 0, 0%, 0%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pfeil
|
||||||
|
{
|
||||||
|
stroke: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.erzeuger
|
||||||
|
{
|
||||||
|
fill: hsl( 0, 0%, 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.neutral
|
||||||
|
{
|
||||||
|
fill: hsl( 0, 0%, 50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.symbol_0
|
||||||
|
{
|
||||||
|
fill: hsl($farbton_symbol_0, $saettigung_symbol, $helligkeit_symbol);
|
||||||
|
background-color: hsl($farbton_symbol_0, $saettigung_symbol, $helligkeit_symbol);
|
||||||
|
}
|
||||||
|
|
||||||
|
.symbol_1
|
||||||
|
{
|
||||||
|
fill: hsl($farbton_symbol_1, $saettigung_symbol, $helligkeit_symbol);
|
||||||
|
background-color: hsl($farbton_symbol_1, $saettigung_symbol, $helligkeit_symbol);
|
||||||
|
}
|
||||||
|
|
||||||
|
.symbol_2
|
||||||
|
{
|
||||||
|
fill: hsl($farbton_symbol_2, $saettigung_symbol, $helligkeit_symbol);
|
||||||
|
background-color: hsl($farbton_symbol_2, $saettigung_symbol, $helligkeit_symbol);
|
||||||
|
}
|
||||||
|
|
||||||
|
.symbol_3
|
||||||
|
{
|
||||||
|
fill: hsl($farbton_symbol_3, $saettigung_symbol, $helligkeit_symbol);
|
||||||
|
background-color: hsl($farbton_symbol_3, $saettigung_symbol, $helligkeit_symbol);
|
||||||
|
}
|
||||||
|
|
||||||
|
.kreis
|
||||||
|
{
|
||||||
|
stroke: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positiv
|
||||||
|
{
|
||||||
|
fill: hsl( 0, 0%, 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.negativ
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
fill: hsl( 0, 0%, 0%);
|
||||||
|
*/
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.eintrag
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
stroke: black;
|
||||||
|
stroke-width: 0.01;
|
||||||
|
*/
|
||||||
|
stroke: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -56,6 +56,7 @@ module mod_vtm_manifestation
|
||||||
super(aufbau);
|
super(aufbau);
|
||||||
this.bereich = bereich;
|
this.bereich = bereich;
|
||||||
this.intervall = (new klasse_nichts<any>());
|
this.intervall = (new klasse_nichts<any>());
|
||||||
|
/*
|
||||||
this.aufbau.lauschen
|
this.aufbau.lauschen
|
||||||
(
|
(
|
||||||
"aenderung_welt",
|
"aenderung_welt",
|
||||||
|
|
@ -65,6 +66,7 @@ module mod_vtm_manifestation
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,168 +0,0 @@
|
||||||
html
|
|
||||||
{
|
|
||||||
margin: 0;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
background-color: hsl(120, 0%, 0%);
|
|
||||||
color: hsl(120, 0%, 100%);
|
|
||||||
|
|
||||||
font-family: monospace;
|
|
||||||
line-height: 200%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body
|
|
||||||
{
|
|
||||||
margin: 0;
|
|
||||||
padding: 8px;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
background-color: hsl(120, 0%, 6.125%);
|
|
||||||
color: hsl(120, 0%, 93.75%);
|
|
||||||
}
|
|
||||||
|
|
||||||
a
|
|
||||||
{
|
|
||||||
color: hsl(120, 50%, 50%);
|
|
||||||
text-decoration: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover
|
|
||||||
{
|
|
||||||
color: hsl(120, 50%, 75%);
|
|
||||||
}
|
|
||||||
|
|
||||||
li
|
|
||||||
{
|
|
||||||
list-style-type: "» ";
|
|
||||||
}
|
|
||||||
|
|
||||||
body > header
|
|
||||||
{
|
|
||||||
font-size: 200%;
|
|
||||||
margin: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#radio_hilfe,
|
|
||||||
#radio_spiel
|
|
||||||
{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#radio_hilfe:checked ~ #hilfe {}
|
|
||||||
#radio_hilfe:checked ~ #spiel {display: none;}
|
|
||||||
|
|
||||||
#radio_spiel:checked ~ #hilfe {display: none;}
|
|
||||||
#radio_spiel:checked ~ #spiel {}
|
|
||||||
|
|
||||||
#spiel
|
|
||||||
{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bereich
|
|
||||||
{
|
|
||||||
margin: 8px;
|
|
||||||
padding: 8px;
|
|
||||||
|
|
||||||
background-color: hsl(120, 0%, 12.5%);
|
|
||||||
color: hsl(120, 0%, 87.5%);
|
|
||||||
}
|
|
||||||
|
|
||||||
#bereich_links
|
|
||||||
{
|
|
||||||
flex-basis: 19%;
|
|
||||||
flex-grow: 1;
|
|
||||||
flex-shrink: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#bereich_mitte
|
|
||||||
{
|
|
||||||
flex-basis: 62%;
|
|
||||||
flex-grow: 1;
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
min-width: 800px;
|
|
||||||
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#bereich_rechts
|
|
||||||
{
|
|
||||||
flex-basis: 19%;
|
|
||||||
flex-grow: 1;
|
|
||||||
flex-shrink: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hilfe section > header
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#knoepfe > *
|
|
||||||
{
|
|
||||||
margin: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#knoepfe.initial > #knopf_schritt {}
|
|
||||||
#knoepfe.initial > #knopf_testen {}
|
|
||||||
#knoepfe.initial > #knopf_anhalten {display: none;}
|
|
||||||
#knoepfe.initial > #knopf_bearbeiten {display: none;}
|
|
||||||
#knoepfe.initial > #knopf_leeren {}
|
|
||||||
|
|
||||||
#knoepfe.ungewiss_laufend > #knopf_schritt {display: none;}
|
|
||||||
#knoepfe.ungewiss_laufend > #knopf_testen {display: none;}
|
|
||||||
#knoepfe.ungewiss_laufend > #knopf_anhalten {}
|
|
||||||
#knoepfe.ungewiss_laufend > #knopf_bearbeiten {display: none;}
|
|
||||||
#knoepfe.ungewiss_laufend > #knopf_leeren {display: none;}
|
|
||||||
|
|
||||||
#knoepfe.ungewiss_stehend > #knopf_schritt {}
|
|
||||||
#knoepfe.ungewiss_stehend > #knopf_testen {}
|
|
||||||
#knoepfe.ungewiss_stehend > #knopf_anhalten {display: none;}
|
|
||||||
#knoepfe.ungewiss_stehend > #knopf_bearbeiten {}
|
|
||||||
#knoepfe.ungewiss_stehend > #knopf_leeren {display: none;}
|
|
||||||
|
|
||||||
#knoepfe.fertig > #knopf_schritt {display: none;}
|
|
||||||
#knoepfe.fertig > #knopf_testen {display: none;}
|
|
||||||
#knoepfe.fertig > #knopf_anhalten {display: none;}
|
|
||||||
#knoepfe.fertig > #knopf_bearbeiten {}
|
|
||||||
#knoepfe.fertig > #knopf_leeren {display: none;}
|
|
||||||
|
|
||||||
#aufgabe_status
|
|
||||||
{
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.hilfe_aktoren_aktor
|
|
||||||
{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hilfe_aktoren_aktor > .hilfe_aktoren_aktor_name
|
|
||||||
{
|
|
||||||
flex-basis: 100%;
|
|
||||||
flex-shrink: 0;
|
|
||||||
flex-grow: 1;
|
|
||||||
|
|
||||||
text-transform: capitalize;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hilfe_aktoren_aktor > .hilfe_aktoren_aktor_bild
|
|
||||||
{
|
|
||||||
flex-basis: 10%;
|
|
||||||
flex-shrink: 1;
|
|
||||||
flex-grow: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hilfe_aktoren_aktor > .hilfe_aktoren_aktor_text
|
|
||||||
{
|
|
||||||
flex-basis: 90%;
|
|
||||||
flex-shrink: 1;
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<script type="text/javascript" src="vtm.js"></script>
|
<script type="text/javascript" src="vtm.js"></script>
|
||||||
<script type="text/javascript" src="daten.js"></script>
|
<script type="text/javascript" src="vtm.dat.js"></script>
|
||||||
<script type="text/javascript">eingang_web();</script>
|
<script type="text/javascript">eingang_web();</script>
|
||||||
<link rel="stylesheet" type="text/css" href="vtm.css"/>
|
<link rel="stylesheet" type="text/css" href="vtm.css"/>
|
||||||
</head>
|
</head>
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
<p id="hilfe_figur_satz1">!translate:hilfe.figur.satz1</p>
|
<p id="hilfe_figur_satz1">!translate:hilfe.figur.satz1</p>
|
||||||
<p id="hilfe_figur_satz2">!translate:hilfe.figur.satz2</p>
|
<p id="hilfe_figur_satz2">!translate:hilfe.figur.satz2</p>
|
||||||
</section>
|
</section>
|
||||||
<section class="bereich">
|
<section class="bereich" id="hilfe_aktoren">
|
||||||
<header id="hilfe_aktoren_titel">!translate:aufbau.aktoren.woerter.plural</header>
|
<header id="hilfe_aktoren_titel">!translate:aufbau.aktoren.woerter.plural</header>
|
||||||
<p id="hilfe_aktoren_einleitung">!translate:hilfe.aktoren.einleitung</p>
|
<p id="hilfe_aktoren_einleitung">!translate:hilfe.aktoren.einleitung</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
||||||
211
quelldatein/manifestation/web/vtm.scss
Normal file
211
quelldatein/manifestation/web/vtm.scss
Normal file
|
|
@ -0,0 +1,211 @@
|
||||||
|
/*
|
||||||
|
* Verrückte Turing-Maschinen — A turing complete game
|
||||||
|
* Copyright (C) 2016 Christian Fraß <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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
html
|
||||||
|
{
|
||||||
|
margin: 0;
|
||||||
|
/*
|
||||||
|
height: 100%;
|
||||||
|
*/
|
||||||
|
|
||||||
|
background-color: hsl(120, 0%, 0%);
|
||||||
|
color: hsl(120, 0%, 100%);
|
||||||
|
|
||||||
|
font-family: monospace;
|
||||||
|
line-height: 200%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body
|
||||||
|
{
|
||||||
|
margin: 0;
|
||||||
|
padding: 8px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
background-color: hsl(120, 0%, 6.125%);
|
||||||
|
color: hsl(120, 0%, 93.75%);
|
||||||
|
}
|
||||||
|
|
||||||
|
a
|
||||||
|
{
|
||||||
|
color: hsl(120, 50%, 50%);
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover
|
||||||
|
{
|
||||||
|
color: hsl(120, 50%, 75%);
|
||||||
|
}
|
||||||
|
|
||||||
|
li
|
||||||
|
{
|
||||||
|
list-style-type: "» ";
|
||||||
|
}
|
||||||
|
|
||||||
|
body > header
|
||||||
|
{
|
||||||
|
font-size: 200%;
|
||||||
|
margin: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#radio_hilfe,
|
||||||
|
#radio_spiel
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#radio_hilfe:checked
|
||||||
|
{
|
||||||
|
& ~ #hilfe {}
|
||||||
|
& ~ #spiel {display: none;}
|
||||||
|
}
|
||||||
|
|
||||||
|
#radio_spiel:checked
|
||||||
|
{
|
||||||
|
& ~ #hilfe {display: none;}
|
||||||
|
& ~ #spiel {}
|
||||||
|
}
|
||||||
|
|
||||||
|
#spiel
|
||||||
|
{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bereich
|
||||||
|
{
|
||||||
|
margin: 8px;
|
||||||
|
padding: 8px;
|
||||||
|
|
||||||
|
background-color: hsl(120, 0%, 12.5%);
|
||||||
|
color: hsl(120, 0%, 87.5%);
|
||||||
|
}
|
||||||
|
|
||||||
|
#bereich_links
|
||||||
|
{
|
||||||
|
flex-basis: 19%;
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bereich_mitte
|
||||||
|
{
|
||||||
|
flex-basis: 62%;
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
min-width: 800px;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bereich_rechts
|
||||||
|
{
|
||||||
|
flex-basis: 19%;
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hilfe section > header
|
||||||
|
{
|
||||||
|
font-size: 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#knoepfe
|
||||||
|
{
|
||||||
|
& > *
|
||||||
|
{
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.initial
|
||||||
|
{
|
||||||
|
& > #knopf_schritt {}
|
||||||
|
& > #knopf_testen {}
|
||||||
|
& > #knopf_anhalten {display: none;}
|
||||||
|
& > #knopf_bearbeiten {display: none;}
|
||||||
|
& > #knopf_leeren {}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ungewiss_laufend
|
||||||
|
{
|
||||||
|
& > #knopf_schritt {display: none;}
|
||||||
|
& > #knopf_testen {display: none;}
|
||||||
|
& > #knopf_anhalten {}
|
||||||
|
& > #knopf_bearbeiten {display: none;}
|
||||||
|
& > #knopf_leeren {display: none;}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ungewiss_stehend
|
||||||
|
{
|
||||||
|
& > #knopf_schritt {}
|
||||||
|
& > #knopf_testen {}
|
||||||
|
& > #knopf_anhalten {display: none;}
|
||||||
|
& > #knopf_bearbeiten {}
|
||||||
|
& > #knopf_leeren {display: none;}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.fertig
|
||||||
|
{
|
||||||
|
& > #knopf_schritt {display: none;}
|
||||||
|
& > #knopf_testen {display: none;}
|
||||||
|
& > #knopf_anhalten {display: none;}
|
||||||
|
& > #knopf_bearbeiten {}
|
||||||
|
& > #knopf_leeren {display: none;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#aufgabe_status
|
||||||
|
{
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hilfe_aktoren_aktor
|
||||||
|
{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
& > .hilfe_aktoren_aktor_name
|
||||||
|
{
|
||||||
|
flex-basis: 100%;
|
||||||
|
flex-shrink: 0;
|
||||||
|
flex-grow: 1;
|
||||||
|
|
||||||
|
text-transform: capitalize;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > .hilfe_aktoren_aktor_bild
|
||||||
|
{
|
||||||
|
flex-basis: 10%;
|
||||||
|
flex-shrink: 1;
|
||||||
|
flex-grow: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > .hilfe_aktoren_aktor_text
|
||||||
|
{
|
||||||
|
flex-basis: 90%;
|
||||||
|
flex-shrink: 1;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
make
|
make all
|
||||||
|
|
||||||
|
|
|
||||||
4
werkzeuge/zuruecksetzen.sh
Executable file
4
werkzeuge/zuruecksetzen.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
make clear
|
||||||
|
|
||||||
Loading…
Reference in a new issue