{"id":95,"date":"2012-04-22T15:02:16","date_gmt":"2012-04-22T13:02:16","guid":{"rendered":"https:\/\/herr-rau.de\/blogs\/inform\/?page_id=95"},"modified":"2012-04-29T09:01:47","modified_gmt":"2012-04-29T07:01:47","slug":"automaten","status":"publish","type":"page","link":"https:\/\/herr-rau.de\/blogs\/inform\/?page_id=95","title":{"rendered":"Automaten"},"content":{"rendered":"<p>Endliche Zustandsautomaten gehen ganz einfach. Bei einem Aufzug legt man die R\u00e4ume fest. Die geh\u00f6ren noch gar nicht zum Aufzug, machen ihn aber erst interessant.<\/p>\n<pre class=\"brush: inform7; title: ; notranslate\" title=\"\">The Basement is a room. &quot;A dark basement.&quot;\r\nThe Ground Floor is a room. &quot;The ground floor. Looks tidy.&quot;\r\nThe First Floor is a room. &quot;Nice view.&quot;<\/pre>\n<p>Dann kommt der Aufzug selber. Er kriegt zwei Kn\u00f6pfe, die man dr\u00fccken kann. F\u00fcr jede m\u00f6gliche ausl\u00f6sende Aktion legt man einen Knopf an. Die Knopf-Objekte sind dabei gar nicht n\u00f6tig, die ausl\u00f6sende Aktionen kann man auch ohne sie haben.<\/p>\n<pre class=\"brush: inform7; title: ; notranslate\" title=\"\">The elevator is an enterable, transparent container in the basement. It is not portable. The description is &quot;An elevator with an up and a down button.&quot;\r\nThe up button is a thing in the elevator. It is scenery. The description is &quot;An arrow pointing upwards.&quot;\r\nThe down button is a thing in the elevator. It is scenery. The description is &quot;An arrow pointing downwards.&quot;<\/pre>\n<p>Um aus dem Aufzug einen Automaten zu machen, kriegt er einen Zustand. Der Zustand \u00e4ndert sich je nach Stockwerk.<\/p>\n<pre class=\"brush: inform7; title: ; notranslate\" title=\"\">The elevator has a number called zustand. The zustand of the elevator is 1.<\/pre>\n<p>Kernst\u00fcck des Automaten ist die Zustands\u00fcbergangsfunktion. Die sieht in Inform so aus:<\/p>\n<pre class=\"brush: inform7; title: ; notranslate\" title=\"\">Instead of pushing the up button when the player is in the elevator:\r\n\tif the zustand of the elevator is 0:\r\n\t\tnow the zustand of the elevator is 1;\r\n\t\tsay &quot;Going up. (Ground floor.)&quot;;\r\n\t\tnow the elevator is in the ground floor;\r\n\totherwise if the zustand of the elevator is 1:\r\n\t\tnow the zustand of the elevator is 2;\r\n\t\tsay &quot;Going up. (First floor.)&quot;;\r\n\t\tnow the elevator is in the first floor;\r\n\totherwise:\r\n\t\tsay &quot;Nothing happens.&quot;\r\n\r\nInstead of pushing the down button when the player is in the elevator:\r\n\tif the zustand of the elevator is 2:\r\n\t\tnow the zustand of the elevator is 1;\r\n\t\tsay &quot;Going down. (Ground floor.)&quot;;\r\n\t\tnow the elevator is in the ground floor;\r\n\totherwise if the zustand of the elevator is 1:\r\n\t\tnow the zustand of the elevator is 0;\r\n\t\tsay &quot;Going down. (Basement.)&quot;;\r\n\t\tnow the elevator is in the basement;\r\n\totherwise:\r\n\t\tsay &quot;Nothing happens.&quot;<\/pre>\n<p>Alternativ auch so:<\/p>\n<pre class=\"brush: inform7; title: ; notranslate\" title=\"\">\r\nInstead of pushing the up button when the zustand of the elevator is 0:\r\n\tnow the zustand of the elevator is 1;\r\n\tsay &quot;Going up. (Ground floor.)&quot;;\r\n\tnow the elevator is in the ground floor.\r\nInstead of pushing the down button when the zustand of the elevator is 0:\r\n\tsay &quot;Nothing happens.&quot;\r\n\r\nInstead of pushing the up button when the zustand of the elevator is 1:\r\n\tnow the zustand of the elevator is 2;\r\n\tsay &quot;Going up. (First floor.)&quot;;\r\n\tnow the elevator is in the first floor.\r\nInstead of pushing the down button when the zustand of the elevator is 1:\r\n\tnow the zustand of the elevator is 0;\r\n\tsay &quot;Going down. (Basement.)&quot;;\r\n\tnow the elevator is in the basement.\r\n\r\nInstead of pushing the up button when the zustand of the elevator is 2:\r\n\tsay &quot;Nothing happens.&quot;;\r\nInstead of pushing the down button when the zustand of the elevator is 2:\r\n\tnow the zustand of the elevator is 1;\r\n\tsay &quot;Going down. (Ground floor.)&quot;;\r\n\tnow the elevator is in the ground floor.\r\n<\/pre>\n<p>Bei beiden Varianten kann man das Dr\u00fccken des Knopfes abk\u00fcrzen, so dass man nur noch up\/down bzw. u\/d eingeben muss:<\/p>\n<pre class=\"brush: inform7; title: ; notranslate\" title=\"\">Instead of going up when the player is in the elevator:\r\n\tTry pushing the up button.\r\nInstead of going down when the player is in the elevator:\r\n\tTry pushing the down button.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Endliche Zustandsautomaten gehen ganz einfach. Bei einem Aufzug legt man die R\u00e4ume fest. Die geh\u00f6ren noch gar nicht zum Aufzug, machen ihn aber erst interessant. The Basement is a room. &quot;A dark basement.&quot; The Ground Floor is a room. &quot;The &hellip; <a href=\"https:\/\/herr-rau.de\/blogs\/inform\/?page_id=95\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":94,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-95","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/pages\/95","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=95"}],"version-history":[{"count":0,"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/pages\/95\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=\/wp\/v2\/pages\/94"}],"wp:attachment":[{"href":"https:\/\/herr-rau.de\/blogs\/inform\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}