diff --git a/licence.txt b/licence.txt index f696770..6b4133a 100644 --- a/licence.txt +++ b/licence.txt @@ -1,18 +1,18 @@ Verrückte Turing-Maschinen — A turing complete game Copyright (C) 2016-2018 kcf -»bacterio-plankton:algebra« is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by +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. -»bacterio-plankton:algebra« is distributed in the hope that it will be useful, +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 Lesser General Public License for more details. +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 Lesser General Public License -along with »bacterio-plankton:algebra«. If not, see . +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/makefile b/makefile index 8b0c3c5..567e0f2 100644 --- a/makefile +++ b/makefile @@ -49,7 +49,7 @@ ${dir_build}/vtm.js: \ ${dir_source}/helpers/errormonade.ts \ ${dir_source}/helpers/string.ts \ ${dir_source}/helpers/xml.ts \ - ${dir_source}/helpers/misc.ts \ + ${dir_source}/helpers/list.ts \ ${dir_source}/helpers/math.ts \ ${dir_source}/helpers/vector.ts \ ${dir_source}/helpers/hashmap.ts \ diff --git a/documents/screenshot.png b/misc/screenshot.png similarity index 100% rename from documents/screenshot.png rename to misc/screenshot.png diff --git a/readme.md b/readme.md index f0668bf..ec04568 100644 --- a/readme.md +++ b/readme.md @@ -3,14 +3,29 @@ Dieses Spiel ist inspiriert von [http://www.kongregate.com/games/PleasingFungus/manufactoria"](Manufacturia), [http://www.crazy-machines.com/](Crazy Machines), [http://worldofgoo.com/](World of Goo) … und auch von unvergessenen Stunden Hardware-Praktikum im Informatik-Studium :P -## Bauen +## Erstellen -Zum Bauen wird ein Typscript- und ein SASS-Compiler benötigt, die man beispielweise per [https://www.npmjs.com/](npm) beziehen kann: `npm install typescript && npm install sass`. Dadurch sollten die Kommandos `tsc` und `sass` verfügbar sein. Hat man das, kann man `make` ausführen, wodurch der Ordner `build` erstellt wird. +### Voraussetzungen + +- [https://www.gnu.org/software/make/manual/make.html](GNU-Make) +- [http://www.typescriptlang.org/](Typescript)-Compiler +- [http://sass-lang.com/](Sass)-Compiler + +Typescript und Sass sind beispielweise per [https://www.npmjs.com/](npm) beziehbar mit `npm install -g typescript && npm install -g sass`. + + +### Kompilieren + +Im Haupt-Verzeichnis ausführen: + + make + +Dadurch wird das Verzeichnis `build` angelegt, welches die Ergebnis-Dateien enthält. ## Starten -Zum Starten/Testen einfach einen Web-Server im Verzeichnis `build` starten (zum Beispiel per `cd build && python3 -m http.server 8888 ; cd -`) und im Browser `http://localhost:8888/vtm.html` aufrufen. +Zum Starten/Testen einen Web-Server im Verzeichnis `build` starten (zum Beispiel per `cd build && python3 -m http.server 8888 ; cd -`) und im Browser `http://localhost:8888/vtm.html` aufrufen. ## Anmerkungen diff --git a/source/data/strings/de.dat.js b/source/data/strings/de.dat.js index c80e7fc..82a3397 100644 --- a/source/data/strings/de.dat.js +++ b/source/data/strings/de.dat.js @@ -33,8 +33,8 @@ jsonp_handle( "controls.clear": "Leeren", "help.introduction": "Dieses Spiel ist inspiriert von ${manufacturia}, ${crazy_machines}, ${world_of_goo} … und auch von unvergessenen Stunden Hardware-Praktikum im Informatik-Studium :P", "help.controls.title": "Steuerung", - "help.controls.eintrag1": "Links-Klick/Rechts-Klick: Feldtyp wechseln", - "help.controls.eintrag2": "Mausrad-Drehen: Feld drehen", + "help.controls.entry1": "Links-Klick/Rechts-Klick: Feldtyp wechseln", + "help.controls.entry2": "Mausrad-Drehen: Feld drehen", "help.token.satz1": "Die Figur kann durch Aktoren auf dem Spielplan umher bewegt werden und wird als schwarzer Kreis dargestellt.", "help.token.satz2": "Zudem verfügt die Figur über ein Liste von gesetzen Symbolen (Band), dargestellt durch farbige Punkte neben der Figur. Gelesen wird das Band immer an der vordersten Stelle und geschrieben wird an die hinterste Stelle (FIFO-Prinzip).", "help.actuators.introduction": "Jedes Feld des Spielplans kann mit einem Aktor bestückt werden, der je nach Typ unterschiedliche Einflüsse auf die Figur ausübt. Folgende Typen stehen zur Verfügung:", diff --git a/source/data/strings/en.dat.js b/source/data/strings/en.dat.js index 57d7903..35b2e93 100644 --- a/source/data/strings/en.dat.js +++ b/source/data/strings/en.dat.js @@ -33,8 +33,8 @@ jsonp_handle( "controls.clear": "clear", "help.introduction": "This game is inspired by ${manufacturia}, ${crazy_machines}, ${world_of_goo} … and also by memorable hours of the practical hardware course during computer science study :P", "help.controls.title": "controls", - "help.controls.eintrag1": "left click/right click: change tile type", - "help.controls.eintrag2": "rotate mousewheel: rotate tile", + "help.controls.entry1": "left click/right click: change tile type", + "help.controls.entry2": "rotate mousewheel: rotate tile", "help.token.satz1": "The token can be moved agame the board by actors and it is displayed as a black circle.", "help.token.satz2": "Additionally the token has a list of set symbols (its tape), which is shown as coloured points next to the token. The tape is always read at the front and written at its back (FIFO principle).", "help.actuators.introduction": "Every tile on the board can be equipped with an actor, which will cause a certain effect on the token depending on the type. The following types are available:", diff --git a/source/helpers/misc.ts b/source/helpers/list.ts similarity index 82% rename from source/helpers/misc.ts rename to source/helpers/list.ts index d3b4ed1..0416387 100644 --- a/source/helpers/misc.ts +++ b/source/helpers/list.ts @@ -37,22 +37,12 @@ module lib_list */ export function copy ( - list : Array, + list : ReadonlyArray, copy_element : (element : type_element)=>type_element = (x => x) ) : Array { - let list_ : Array = []; - list.forEach - ( - element => - { - let element_ : type_element = copy_element(element); - list_.push(element); - } - ) - ; - return list_; + return list.map(copy_element); } } diff --git a/source/main.ts b/source/main.ts index 6a5f9b5..3c2a1f0 100644 --- a/source/main.ts +++ b/source/main.ts @@ -83,7 +83,7 @@ module mod_vtm { // Übersetzungen { - let languages : Array = navigator.languages; + let languages : Array = lib_list.copy(navigator.languages); let language_native : string = "de"; if (! languages[""+"includes"](language_native)) languages.push(language_native); diff --git a/tools/pack.sh b/tools/pack.sh new file mode 100755 index 0000000..49b0c80 --- /dev/null +++ b/tools/pack.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +target=/tmp/vtm.tar.xz +tar \ + --directory=.. \ + --create \ + --exclude='.git*' \ + --exclude='tools*' \ + vtm \ + | xz \ + > ${target} +echo "-- written to ${target}" +