régime androïde (recette n°7)
Recette culinaire
Ingrédients :
- 1 cuisine avec 3 placards à vaisselle numérotés de 1 à 3
(le 3ème placard comportant un tiroir)
- 1 salle à manger avec 1 table et 6 chaises
Nombre de convives :
quantités indiquées pour 6 androïdes
Définition de variables :
n=0
Module :
000 --- begin
001 ALLER and ENTRER {cuisine}
002 if VOIR {placard#03} then STOP
else [CHERCHER {placard#03} and RETOURNER 002]
003 ROTATION(face) {placard}
004 OUVRIR {placard}
005 SAISIR 6*[{assiette}+{verre}]
006 FERMER {placard}
007 OUVRIR {tiroir}
008 SAISIR 6*[{fourchette}+{couteau}]
009 FERMER {tiroir}
010 ALLER and ENTRER {salle}
011 ALLER {table}
012 if {chaise} then STOP else RETOURNER 011
013 POSER {assiette} on {table}
014 DEPLACER(front=1; top=0; right=0) {bras}
015 POSER {verre} on {table}
016 DEPLACER(front=-1; top=0; right=1) {bras}
017 POSER {couteau} on {table}
018 DEPLACER(front=0; top=0; right=-2) {bras}
019 POSER {fourchette} on {table}
020 RANGER {bras}
021 ALLER next {chaise}
022 n=n+1
023 if n=6 then ALLER 024 else RETOURNER 013
024 PARLER "Asseyez-vous."
025 TIRER(front=-1; top=0; right=0) {chaise}
026 ASSEOIR
027 PARLER "Mes chers amis, bon appétit !"
028 --- end