Section courante

A propos

Section administrative du site

Le jeu Soko-Ban est un jeu de réflexion consistant à déplacer des caisses dans un entrepôt de façon à les mettre tous dans un même emplacement (soit au dessus «.» de ce prototype de jeu) pour chacun des étages. Ce qui rend le jeu plus difficile, c'est le fait que ne peut pas tiré des caisses, on peut seulement les pousser. Si vous ne savez pas comment jouer, enfoncé la touche F3 dans le première étage, et le bonhomme sourire déplacera pour vous chacun des cases au dessus des 6 points.

J'ai développé à l'origine cette version du jeu avec ma bibliothèque personnelle graphique, mais par souci de portabilité, j'ai préféré le transformer en écran de texte et ainsi, il est possible par exemple de jouer à ce jeu également avec d'autres compilateurs de Pascal comme Free Pascal.

Le jeu est en quelque sorte un labyrinthe avec des endroits précis où ses les caisses, les murs et le bonhomme. Ainsi, il faut donc, des tableaux de constantes (Tab001, Tab002,...) correspondant à chacun des étages. La génération des étages de façon aléatoire n'aurait pas garantie, d'une part, le niveau de difficulté et deuxièmement qu'il n'y aurait pas été impossible de faire l'étage.

Une démonstration dans le première étage est inclus dans le code sous forme d'une liste de constante correspondant à chacun des déplacements du clavier dans la constante (Solution001). Le jeu changera la variable Run:=True afin de permettre de déplacer automatiquement le joueur. Une pause est naturellement inclus en chaque déplacement (sous la forme de la procédure WaitRetace) afin de permettre à l'utilisateur de constater le déplacement effectué et de comprendre la stratégie à appliquer.

Le moteur de jeu est simplement une boucle attendant que l'utilisateur enfonce une touche du clavier avant d'effectuer une action : kbLeft pour la touche , kbRight pour la touche , kbUp pour la touche , kbDn pour la touche ,...


L'exemple de jeu Soko-Ban suivant est développé en Turbo Pascal 7 et fonctionne également sous Free Pascal. Voici le code source en Turbo Pascal du jeu :

  1. Program SOKOBAN;
  2.  
  3. Uses Crt,DOS,Strings;
  4.  
  5. Const
  6.  {Code de touche clavier renvoyée par ReadKey}
  7.  kbNoKey=0;{Pas de touche}
  8.  kbEsc=$001B;{Escape}
  9.  kbUp=$4800;{Up : Caractère : H}
  10.  kbLeft=$4B00;{Flèche de gauche (Left) : K }
  11.  kbRight=$4D00;{Flèche de droite (Right) : M }
  12.  kbDn=$5000;{Flèche du bas (Down) : P }
  13.  kbHome=$4700;{Home}
  14.  kbTab=$0F09;{Tabulation}
  15.  kbEnd=$4F00;{End}
  16.  kbEnter=$000D;{Enter}
  17.  kbF1=$3B00;{F1}
  18.  kbF2=$3C00;{F2}
  19.  kbF3=$3D00;{F3}
  20.  kbF4=$3E00;{F4}
  21.  kbF5=$3F00;{F5}
  22.  kbF6=$4000;{F6}
  23.  kbF7=$4100;{F7}
  24.  kbF8=$4200;{F8}
  25.  kbF9=$4300;{F9}
  26.  kbF10=$4400;{F10}
  27.  
  28. Const
  29.  Tab001:Array[0..11]of PChar=('~~~~#####~~~~~~~~~~',
  30.                               '~~~~#   #~~~~~~~~~~',
  31.                               '~~~~#$  #~~~~~~~~~~',
  32.                               '~~###  $##~~~~~~~~~',
  33.                               '~~#  $ $ #~~~~~~~~~',
  34.                               '### # ## #~~~######',
  35.                               '#   # ## #####  ..#',
  36.                               '# $  $          ..#',
  37.                               '##### ### #@##  ..#',
  38.                               '~~~~#     #########',
  39.                               '~~~~#######~~~~~~~~',
  40.                               NIL);
  41.  Solution001:Array[0..255]of Word=(
  42.   kbUp,kbLeft,kbLeft,kbLeft,kbUp,kbUp,kbUp,kbLeft,kbUp,
  43.   kbLeft,kbLeft,kbDn,kbLeft,kbLeft,kbDn,kbDn,kbDn,kbRight,
  44.   kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,
  45.   kbRight,kbRight,kbRight,kbRight,kbRight,kbDn,kbRight,
  46.   kbUp,kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,
  47.   kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,kbUp,
  48.   kbLeft,kbLeft,kbDn,kbRight,kbRight,kbRight,kbRight,
  49.   kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,
  50.   kbRight,kbRight,kbRight,kbUp,kbRight,kbDn,kbLeft,kbDn,
  51.   kbRight,kbLeft,kbUp,kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,
  52.   kbLeft,kbLeft,kbUp,kbUp,kbUp,kbLeft,kbUp,kbLeft,kbLeft,
  53.   kbDn,kbDn,kbDn,kbUp,kbUp,kbLeft,kbLeft,kbDn,kbDn,kbDn,
  54.   kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,
  55.   kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,kbLeft,
  56.   kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,kbUp,
  57.   kbUp,kbUp,kbLeft,kbLeft,kbUp,kbLeft,kbDn,kbDn,kbDn,kbUp,
  58.   kbUp,kbLeft,kbLeft,kbDn,kbDn,kbDn,kbRight,kbRight,
  59.   kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,
  60.   kbRight,kbRight,kbRight,kbLeft,kbLeft,kbLeft,kbLeft,
  61.   kbLeft,kbLeft,kbLeft,kbLeft,kbRight,kbUp,kbUp,kbUp,kbLeft,
  62.   kbLeft,kbUp,kbUp,kbUp,kbLeft,kbDn,kbDn,kbDn,kbDn,kbDn,kbUp,
  63.   kbUp,kbLeft,kbLeft,kbDn,kbDn,kbDn,kbRight,kbRight,kbRight,
  64.   kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,
  65.   kbRight,kbDn,kbRight,kbUp,kbLeft,kbUp,kbRight,kbLeft,kbDn,
  66.   kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,kbLeft,kbUp,kbUp,kbUp,
  67.   kbLeft,kbLeft,kbUp,kbUp,kbUp,kbRight,kbDn,kbDn,kbLeft,
  68.   kbLeft,kbDn,kbDn,kbDn,kbDn,kbRight,kbRight,kbRight,kbUp,
  69.   kbUp,kbUp,kbLeft,kbLeft,kbUp,kbLeft,kbDn,kbDn,kbDn,kbUp,
  70.   kbUp,kbLeft,kbLeft,kbDn,kbDn,kbDn,kbRight,kbRight,kbRight,
  71.   kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,kbRight,
  72.   kbRight,kbUp,kbRight,kbDn,kbLeft,kbDn,kbRight
  73.  );
  74.  Tab002:Array[0..10]of PChar=('############~~',
  75.                              '#..  #     ###',
  76.                              '#..  # $  $  #',
  77.                              '#..  #$####  #',
  78.                              '#..    @ ##  #',
  79.                              '#..  # #  $ ##',
  80.                              '###### ##$ $ #',
  81.                              '~~# $  $ $ $ #',
  82.                              '~~#    #     #',
  83.                              '~~############',
  84.                              NIL);
  85.  Tab003:Array[0..10]of PChar=('~~~~~~~~########~',
  86.                              '~~~~~~~~#     @#~',
  87.                              '~~~~~~~~# $#$ ##~',
  88.                              '~~~~~~~~# $  $#~~',
  89.                              '~~~~~~~~##$ $ #~~',
  90.                              '######### $ # ###',
  91.                              '#....  ## $  $  #',
  92.                              '##...    $  $   #',
  93.                              '#....  ##########',
  94.                              '########~~~~~~~~~',
  95.                              NIL);
  96.  
  97.  Tab004:Array[0..14]of PChar=('~~~~~~~~~~~########',
  98.                               '~~~~~~~~~~~#  ....#',
  99.                               '############  ....#',
  100.                               '#    #  $ $   ....#',
  101.                               '# $$$#$  $ #  ....#',
  102.                               '#  $     $ #  ....#',
  103.                               '# $$ #$ $ $########',
  104.                               '#  $ #     #~~~~~~~',
  105.                               '## #########~~~~~~~',
  106.                               '#    #    ##~~~~~~~',
  107.                               '#     $   ##~~~~~~~',
  108.                               '#  $$#$$  @#~~~~~~~',
  109.                               '#    #    ##~~~~~~~',
  110.                               '###########~~~~~~~~',
  111.                               NIL);
  112.  Tab005:Array[0..13]of PChar=('~~~~~~~~#####~~~~',
  113.                               '~~~~~~~~#   #####',
  114.                               '~~~~~~~~# #$##  #',
  115.                               '~~~~~~~~#     $ #',
  116.                               '######### ###   #',
  117.                               '#....  ## $  $###',
  118.                               '#....    $ $$ ##~',
  119.                               '#....  ##$  $ @#~',
  120.                               '#########  $  ##~',
  121.                               '~~~~~~~~# $ $  #~',
  122.                               '~~~~~~~~### ## #~',
  123.                               '~~~~~~~~~~#    #~',
  124.                               '~~~~~~~~~~######~',
  125.                               NIL);
  126.  Tab006:Array[0..11]of PChar=('######~~###~',
  127.                               '#..  #~##@##',
  128.                               '#..  ###   #',
  129.                               '#..     $$ #',
  130.                               '#..  # # $ #',
  131.                               '#..### # $ #',
  132.                               '#### $ #$  #',
  133.                               '~~~#  $# $ #',
  134.                               '~~~# $  $  #',
  135.                               '~~~#  ##   #',
  136.                               '~~~#########',
  137.                               NIL);
  138.  Tab007:Array[0..12]of PChar=('~~~~~~~#####~',
  139.                               '~#######   ##',
  140.                               '## # @## $$ #',
  141.                               '#    $      #',
  142.                               '#  $  ###   #',
  143.                               '### #####$###',
  144.                               '# $  ### ..#~',
  145.                               '# $ $ $ ...#~',
  146.                               '#    ###...#~',
  147.                               '# $$ #~#...#~',
  148.                               '#  ###~#####~',
  149.                               '####~~~~~~~~~',
  150.                               NIL);
  151.  Tab008:Array[0..16]of PChar=('~~####~~~~~~~~~~',
  152.                               '~~#  ###########',
  153.                               '~~#    $   $ $ #',
  154.                               '~~# $# $ #  $  #',
  155.                               '~~#  $ $  #    #',
  156.                               '### $# #  #### #',
  157.                               '#@#$ $ $  ##   #',
  158.                               '#    $ #$#   # #',
  159.                               '#   $    $ $ $ #',
  160.                               '#####  #########',
  161.                               '~~#      #~~~~~~',
  162.                               '~~#      #~~~~~~',
  163.                               '~~#......#~~~~~~',
  164.                               '~~#......#~~~~~~',
  165.                               '~~#......#~~~~~~',
  166.                               '~~########~~~~~~',
  167.                               NIL);
  168.  Tab009:Array[0..14]of PChar=('~~~~~~~~~~#######',
  169.                               '~~~~~~~~~~#  ...#',
  170.                               '~~~~~~#####  ...#',
  171.                               '~~~~~~#      . .#',
  172.                               '~~~~~~#  ##  ...#',
  173.                               '~~~~~~## ##  ...#',
  174.                               '~~~~~### ########',
  175.                               '~~~~~# $$$ ##~~~~',
  176.                               '~#####  $ $ #####',
  177.                               '##   #$ $   #   #',
  178.                               '#@ $  $    $  $ #',
  179.                               '###### $$ $ #####',
  180.                               '~~~~~#      #~~~~',
  181.                               '~~~~~########~~~~',
  182.                               NIL);
  183.  Tab010:Array[0..16]of PChar=('~###~~#############',
  184.                               '##@####       #   #',
  185.                               '# $$   $$  $ $ ...#',
  186.                               '#  $$$#    $  #...#',
  187.                               '# $   # $$ $$ #...#',
  188.                               '###   #  $    #...#',
  189.                               '#     # $ $ $ #...#',
  190.                               '#    ###### ###...#',
  191.                               '## #  #  $ $  #...#',
  192.                               '#  ## # $$ $ $##..#',
  193.                               '# ..# #  $      #.#',
  194.                               '# ..# # $$$ $$$ #.#',
  195.                               '##### #       # #.#',
  196.                               '~~~~# ######### #.#',
  197.                               '~~~~#           #.#',
  198.                               '~~~~###############',
  199.                               NIL);
  200.  Tab011:Array[0..15]of PChar=('~~~~~~~~~~####~~~~~',
  201.                               '~~~~~####~#  #~~~~~',
  202.                               '~~~### @###$ #~~~~~',
  203.                               '~~##      $  #~~~~~',
  204.                               '~##  $ $$## ##~~~~~',
  205.                               '~#  #$##     #~~~~~',
  206.                               '~# # $ $$ # ###~~~~',
  207.                               '~#   $ #  # $ #####',
  208.                               '####    #  $$ #   #',
  209.                               '#### ## $         #',
  210.                               '#.    ###  ########',
  211.                               '#.. ..#~####~~~~~~~',
  212.                               '#...#.#~~~~~~~~~~~~',
  213.                               '#.....#~~~~~~~~~~~~',
  214.                               '#######~~~~~~~~~~~~',
  215.                               NIL);
  216.  Tab012:Array[0..13]of PChar=('################~',
  217.                               '#              #~',
  218.                               '# # ######     #~',
  219.                               '# #  $ $ $ $#  #~',
  220.                               '# #   $@$   ## ##',
  221.                               '# #  $ $ $###...#',
  222.                               '# #   $ $  ##...#',
  223.                               '# ###$$$ $ ##...#',
  224.                               '#     # ## ##...#',
  225.                               '#####   ## ##...#',
  226.                               '~~~~#####     ###',
  227.                               '~~~~~~~~#     #~~',
  228.                               '~~~~~~~~#######~~',
  229.                               NIL);
  230.  Tab013:Array[0..14]of PChar=('#####~####~~~~~~',
  231.                               '#...#~#  ####~~~',
  232.                               '#...###  $  #~~~',
  233.                               '#....## $  $###~',
  234.                               '##....##   $  #~',
  235.                               '###... ## $ $ #~',
  236.                               '# ##    #  $  #~',
  237.                               '#  ## # ### ####',
  238.                               '# $ # #$  $    #',
  239.                               '#  $ @ $    $  #',
  240.                               '#   # $ $$ $ ###',
  241.                               '#  ######  ###~~',
  242.                               '# ##~~~~####~~~~',
  243.                               '###~~~~~~~~~~~~~',
  244.                               NIL);
  245.  Tab014:Array[0..13]of PChar=('~~~#########~~~~~~~',
  246.                               '~~##   ##  ######~~',
  247.                               '###     #  #    ###',
  248.                               '#  $ #$ #  #  ... #',
  249.                               '# # $#@$## # #.#. #',
  250.                               '#  # #$  #    . . #',
  251.                               '# $    $ # # #.#. #',
  252.                               '#   ##  ##$ $ . . #',
  253.                               '# $ #   #  #$#.#. #',
  254.                               '## $  $   $  $... #',
  255.                               '~#$ ######    ##  #',
  256.                               '~#  #~~~~##########',
  257.                               '~####~~~~~~~~~~~~~~',
  258.                               NIL);
  259.  Tab015:Array[0..16]of PChar=('~~~~~~~#######~~~~',
  260.                               '~#######     #~~~~',
  261.                               '~#     # $@$ #~~~~',
  262.                               '~#$$ #   #########',
  263.                               '~# ###......##   #',
  264.                               '~#   $......## # #',
  265.                               '~# ###......     #',
  266.                               '##   #### ### #$##',
  267.                               '#  #$   #  $  # #~',
  268.                               '#  $ $$$  # $## #~',
  269.                               '#   $ $ ###$$ # #~',
  270.                               '#####     $   # #~',
  271.                               '~~~~### ###   # #~',
  272.                               '~~~~~~#     #   #~',
  273.                               '~~~~~~########  #~',
  274.                               '~~~~~~~~~~~~~####~',
  275.                               NIL);
  276.  Tab016:Array[0..16]of PChar=('~~~########~~~~~~',
  277.                               '~~~#   #  #~~~~~~',
  278.                               '~~~#  $   #~~~~~~',
  279.                               '~### #$   ####~~~',
  280.                               '~#  $  ##$   #~~~',
  281.                               '~#  # @ $ # $#~~~',
  282.                               '~#  #      $ ####',
  283.                               '~## ####$##     #',
  284.                               '~# $#.....# #   #',
  285.                               '~#  $..**. $# ###',
  286.                               '##  #.....#   #~~',
  287.                               '#   ### #######~~',
  288.                               '# $$  #  #~~~~~~~',
  289.                               '#  #     #~~~~~~~',
  290.                               '######   #~~~~~~~',
  291.                               '~~~~~#####~~~~~~~',
  292.                               NIL);
  293.  Tab017:Array[0..15]of PChar=('#####~~~~~~~~~',
  294.                               '#   ##~~~~~~~~',
  295.                               '#    #~~####~~',
  296.                               '# $  ####  #~~',
  297.                               '#  $$ $   $#~~',
  298.                               '###@ #$    ##~',
  299.                               '~#  ##  $ $ ##',
  300.                               '~# $  ## ## .#',
  301.                               '~#  #$##$  #.#',
  302.                               '~###   $..##.#',
  303.                               '~~#    #.*...#',
  304.                               '~~# $$ #.....#',
  305.                               '~~#  #########',
  306.                               '~~#  #~~~~~~~~',
  307.                               '~~####~~~~~~~~',
  308.                               NIL);
  309.  Tab018:Array[0..14]of PChar=('~~~##########~~~',
  310.                               '~~~#..  #   #~~~',
  311.                               '~~~#..      #~~~',
  312.                               '~~~#..  #  ####~',
  313.                               '~~#######  #  ##',
  314.                               '~~#            #',
  315.                               '~~#  #  ##  #  #',
  316.                               '#### ##  #### ##',
  317.                               '#  $  ##### #  #',
  318.                               '# # $  $  # $  #',
  319.                               '# @$  $   #   ##',
  320.                               '#### ## #######~',
  321.                               '~~~#    #~~~~~~~',
  322.                               '~~~######~~~~~~~',
  323.                               NIL);
  324.  Tab019:Array[0..13]of PChar=('~~~~~###########~~~',
  325.                               '~~~~~#  .  #   #~~~',
  326.                               '~~~~~# #.    @ #~~~',
  327.                               '~##### ##..# ####~~',
  328.                               '##  # ..###     ###',
  329.                               '# $ #...   $ #  $ #',
  330.                               '#    .. ##  ## ## #',
  331.                               '####$##$# $ #   # #',
  332.                               '~~## #    #$ $$ # #',
  333.                               '~~#  $ # #  # $## #',
  334.                               '~~#               #',
  335.                               '~~#  ###########  #',
  336.                               '~~####~~~~~~~~~####',
  337.                               NIL);
  338.  Tab020:Array[0..16]of PChar=('~~######~~~~~~~~~~~',
  339.                               '~~#   @####~~~~~~~~',
  340.                               '##### $   #~~~~~~~~',
  341.                               '#   ##    ####~~~~~',
  342.                               '# $ #  ##    #~~~~~',
  343.                               '# $ #  ##### #~~~~~',
  344.                               '## $  $    # #~~~~~',
  345.                               '## $ $ ### # #~~~~~',
  346.                               '## #  $  # # #~~~~~',
  347.                               '## # #$#   # #~~~~~',
  348.                               '## ###   # # ######',
  349.                               '#  $  #### # #....#',
  350.                               '#    $    $   ..#.#',
  351.                               '####$  $# $   ....#',
  352.                               '#       #  ## ....#',
  353.                               '###################',
  354.                               NIL);
  355.  Tab021:Array[0..16]of PChar=('~~~~##########~~~~~',
  356.                               '#####        ####~~',
  357.                               '#     #   $  #@ #~~',
  358.                               '# #######$####  ###',
  359.                               '# #    ## #  #$ ..#',
  360.                               '# # $     #  #  #.#',
  361.                               '# # $  #     #$ ..#',
  362.                               '# #  ### ##     #.#',
  363.                               '# ###  #  #  #$ ..#',
  364.                               '# #    #  ####  #.#',
  365.                               '# #$   $  $  #$ ..#',
  366.                               '#    $ # $ $ #  #.#',
  367.                               '#### $###    #$ ..#',
  368.                               '~~~#    $$ ###....#',
  369.                               '~~~#      ##~######',
  370.                               '~~~########~~~~~~~~',
  371.                               NIL);
  372.  Tab022:Array[0..15]of PChar=('#########~~~~~~',
  373.                               '#       #~~~~~~',
  374.                               '#       ####~~~',
  375.                               '## #### #  #~~~',
  376.                               '## #@##    #~~~',
  377.                               '# $$$ $  $$#~~~',
  378.                               '#  # ## $  #~~~',
  379.                               '#  # ##  $ ####',
  380.                               '####  $$$ $#  #',
  381.                               '~#   ##   ....#',
  382.                               '~# #   # #.. .#',
  383.                               '~#   # # ##...#',
  384.                               '~##### $  #...#',
  385.                               '~~~~~##   #####',
  386.                               '~~~~~~#####~~~~',
  387.                               NIL);
  388.  Tab023:Array[0..16]of PChar=('######~~~~~####~~~~',
  389.                               '#    #######  #####',
  390.                               '#   $#  #  $  #   #',
  391.                               '#  $  $  $ # $ $  #',
  392.                               '##$ $   # @# $    #',
  393.                               '#  $ ########### ##',
  394.                               '# #   #.......# $#~',
  395.                               '# ##  # ......#  #~',
  396.                               '# #   $........$ #~',
  397.                               '# # $ #.... ..#  #~',
  398.                               '#  $ $####$#### $#~',
  399.                               '# $   ### $   $  ##',
  400.                               '# $     $ $  $    #',
  401.                               '## ###### $ ##### #',
  402.                               '#         #       #',
  403.                               '###################',
  404.                               NIL);
  405.  Tab024:Array[0..14]of PChar=('~~~~#######~~~~~~~~',
  406.                               '~~~~#  #  ####~~~~~',
  407.                               '##### $#$ #  ##~~~~',
  408.                               '#.. #  #  #   #~~~~',
  409.                               '#.. # $#$ #  $####~',
  410.                               '#.  #     #$  #  #~',
  411.                               '#..   $#  # $    #~',
  412.                               '#..@#  #$ #$  #  #~',
  413.                               '#.. # $#     $#  #~',
  414.                               '#.. #  #$$#$  #  ##',
  415.                               '#.. # $#  #  $#$  #',
  416.                               '#.. #  #  #   #   #',
  417.                               '##. ####  #####   #',
  418.                               '~####~~####~~~#####',
  419.                               NIL);
  420.  Tab025:Array[0..16]of PChar=('###############~~~~',
  421.                               '#..........  .####~',
  422.                               '#..........$$.#  #~',
  423.                               '###########$ #   ##',
  424.                               '#      $  $     $ #',
  425.                               '## ####   #  $ #  #',
  426.                               '#      #   ##  # ##',
  427.                               '#  $#  # ##  ### ##',
  428.                               '# $ #$###    ### ##',
  429.                               '###  $ #  #  ### ##',
  430.                               '###    $ ## #  # ##',
  431.                               '~# $  #  $  $ $   #',
  432.                               '~#  $  $#$$$  #   #',
  433.                               '~#  #  $      #####',
  434.                               '~# @##  #  #  #~~~~',
  435.                               '~##############~~~~',
  436.                               NIL);
  437.  Tab026:Array[0..16]of PChar=('####~~~~~~~~~~~~~~~',
  438.                               '#  ##############~~',
  439.                               '#  #   ..#......#~~',
  440.                               '#  # # ##### ...#~~',
  441.                               '##$#    ........#~~',
  442.                               '#   ##$######  ####',
  443.                               '# $ #     ######@ #',
  444.                               '##$ # $   ######  #',
  445.                               '#  $ #$$$##       #',
  446.                               '#      #    #$#$###',
  447.                               '# #### #$$$$$    #~',
  448.                               '# #    $     #   #~',
  449.                               '# #   ##        ###',
  450.                               '# ######$###### $ #',
  451.                               '#        #~~~~#   #',
  452.                               '##########~~~~#####',
  453.                               NIL);
  454.  Tab027:Array[0..12]of PChar=('~#######~~~~~~~',
  455.                               '~#  #  #####~~~',
  456.                               '##  #  #...###~',
  457.                               '#  $#  #...  #~',
  458.                               '# $ #$$ ...  #~',
  459.                               '#  $#  #... .#~',
  460.                               '#   # $########',
  461.                               '##$       $ $ #',
  462.                               '##  #  $$ #   #',
  463.                               '~######  ##$$@#',
  464.                               '~~~~~~#      ##',
  465.                               '~~~~~~########~',
  466.                               NIL);
  467.  Tab028:Array[0..13]of PChar=('~#################~',
  468.                               '~#...   #    #   ##',
  469.                               '##.....  $## # #$ #',
  470.                               '#......#  $  #    #',
  471.                               '#......#  #  # #  #',
  472.                               '######### $  $ $  #',
  473.                               '~~#     #$##$ ##$##',
  474.                               '~##   $    # $    #',
  475.                               '~#  ## ### #  ##$ #',
  476.                               '~# $ $$     $  $  #',
  477.                               '~# $    $##$ ######',
  478.                               '~#######  @ ##~~~~~',
  479.                               '~~~~~~~######~~~~~~',
  480.                               NIL);
  481.  Tab029:Array[0..15]of PChar=('~~~~~~~~~#####~~~',
  482.                               '~~~~~#####   #~~~',
  483.                               '~~~~## $  $  ####',
  484.                               '##### $  $ $ ##.#',
  485.                               '#       $$  ##..#',
  486.                               '#  ###### ###.. #',
  487.                               '## #  #    #... #',
  488.                               '# $   #    #... #',
  489.                               '#@ #$ ## ####...#',
  490.                               '####  $ $$  ##..#',
  491.                               '~~~##  $ $  $...#',
  492.                               '~~~~# $$  $ #  .#',
  493.                               '~~~~#   $ $  ####',
  494.                               '~~~~######   #~~~',
  495.                               '~~~~~~~~~#####~~~',
  496.                               NIL);
  497.  Tab030:Array[0..13]of PChar=('#####~~~~~~~~~~~~~~',
  498.                               '#   ##~~~~~~~~~~~~~',
  499.                               '# $  #########~~~~~',
  500.                               '## # #       ######',
  501.                               '## #   $#$#@  #   #',
  502.                               '#  #      $ #   $ #',
  503.                               '#  ### ######### ##',
  504.                               '#  ## ..*..... # ##',
  505.                               '## ## *.*..*.* # ##',
  506.                               '# $########## ##$ #',
  507.                               '#  $   $  $    $  #',
  508.                               '#  #   #   #   #  #',
  509.                               '###################',
  510.                               NIL);
  511.  Tab031:Array[0..14]of PChar=('~~~~~~~###########~',
  512.                               '~~~~~~~#   #     #~',
  513.                               '#####~~#     $ $ #~',
  514.                               '#   ##### $## # ##~',
  515.                               '# $ ##   # ## $  #~',
  516.                               '# $  @$$ # ##$$$ #~',
  517.                               '## ###   # ##    #~',
  518.                               '## #   ### #####$#~',
  519.                               '## #     $  #....#~',
  520.                               '#  ### ## $ #....##',
  521.                               '# $   $ #   #..$. #',
  522.                               '#  ## $ #  ##.... #',
  523.                               '#####   ######...##',
  524.                               '~~~~#####~~~~#####~',
  525.                               NIL);
  526.  Tab032:Array[0..16]of PChar=('~~####~~~~~~~~~~~~',
  527.                               '~~#  #########~~~~',
  528.                               '~##  ##  #   #~~~~',
  529.                               '~#  $# $@$   ####~',
  530.                               '~#$  $  # $ $#  ##',
  531.                               '##  $## #$ $     #',
  532.                               '#  #  # #   $$$  #',
  533.                               '# $    $  $## ####',
  534.                               '# $ $ #$#  #  #~~~',
  535.                               '##  ###  ###$ #~~~',
  536.                               '~#  #....     #~~~',
  537.                               '~####......####~~~',
  538.                               '~~~#....####~~~~~~',
  539.                               '~~~#...##~~~~~~~~~',
  540.                               '~~~#...#~~~~~~~~~~',
  541.                               '~~~#####~~~~~~~~~~',
  542.                               NIL);
  543.  Tab033:Array[0..15]of PChar=('~~~~~~####~~~',
  544.                               '~~#####  #~~~',
  545.                               '~##     $#~~~',
  546.                               '## $  ## ###~',
  547.                               '#@$ $ # $  #~',
  548.                               '#### ##   $#~',
  549.                               '~#....#$ $ #~',
  550.                               '~#....#   $#~',
  551.                               '~#....  $$ ##',
  552.                               '~#... # $   #',
  553.                               '~######$ $  #',
  554.                               '~~~~~~#   ###',
  555.                               '~~~~~~#$ ###~',
  556.                               '~~~~~~#  #~~~',
  557.                               '~~~~~~####~~~',
  558.                               NIL);
  559.  Tab034:Array[0..15]of PChar=('############',
  560.                               '##     ##  #',
  561.                               '##   $   $ #',
  562.                               '#### ## $$ #',
  563.                               '#   $ #    #',
  564.                               '# $$$ # ####',
  565.                               '#   # # $ ##',
  566.                               '#  #  #  $ #',
  567.                               '# $# $#    #',
  568.                               '#   ..# ####',
  569.                               '####.. $ #@#',
  570.                               '#.....# $# #',
  571.                               '##....#  $ #',
  572.                               '###..##    #',
  573.                               '############',
  574.                               NIL);
  575.  Tab035:Array[0..15]of PChar=('~#########~~~~',
  576.                               '~#....   ##~~~',
  577.                               '~#.#.#  $ ##~~',
  578.                               '##....# # @##~',
  579.                               '# ....#  #  ##',
  580.                               '#     #$ ##$ #',
  581.                               '## ###  $    #',
  582.                               '~#$  $ $ $#  #',
  583.                               '~# #  $ $ ## #',
  584.                               '~#  ###  ##  #',
  585.                               '~#    ## ## ##',
  586.                               '~#  $ #  $  #~',
  587.                               '~###$ $   ###~',
  588.                               '~~~#  #####~~~',
  589.                               '~~~####~~~~~~~',
  590.                               NIL);
  591.  Tab036:Array[0..16]of PChar=('############~######',
  592.                               '#   #    # ###....#',
  593.                               '#   $$#   @  .....#',
  594.                               '#   # ###   # ....#',
  595.                               '## ## ###  #  ....#',
  596.                               ' # $ $     # # ####',
  597.                               ' #  $ $##  #      #',
  598.                               '#### #  #### # ## #',
  599.                               '#  # #$   ## #    #',
  600.                               '# $  $  # ## #   ##',
  601.                               '# # $ $    # #   #~',
  602.                               '#  $ ## ## # #####~',
  603.                               '# $$     $$  #~~~~~',
  604.                               '## ## ### $  #~~~~~',
  605.                               '~#    #~#    #~~~~~',
  606.                               '~######~######~~~~~',
  607.                               NIL);
  608.  Tab037:Array[0..16]of PChar=('~~~~~~~~~~~~#####~~',
  609.                               '#####~~######   #~~',
  610.                               '#   ####  $ $ $ #~~',
  611.                               '# $   ## ## ##  ##~',
  612.                               '#   $ $     $  $ #~',
  613.                               '### $  ## ##     ##',
  614.                               '~~# ##### #####$$ #',
  615.                               '~##$##### @##     #',
  616.                               '~# $  ###$### $  ##',
  617.                               '~# $  #   ###  ###~',
  618.                               '~# $$ $ #   $$ #~~~',
  619.                               '~#     #   ##  #~~~',
  620.                               '~#######.. .###~~~~',
  621.                               '~~~~#.........#~~~~',
  622.                               '~~~~#.........#~~~~',
  623.                               '~~~~###########~~~~',
  624.                               NIL);
  625.  Tab038:Array[0..15]of PChar=('###########~~~~~~~~',
  626.                               '#......   #########',
  627.                               '#......   #  ##   #',
  628.                               '#..### $    $     #',
  629.                               '#... $ $ #   ##   #',
  630.                               '#...#$#####    #  #',
  631.                               '###    #   #$  #$ #',
  632.                               '~~#  $$ $ $  $##  #',
  633.                               '~~#  $   #$#$ ##$ #',
  634.                               '~~### ## #    ##  #',
  635.                               '~~~#  $ $ ## ######',
  636.                               '~~~#    $  $  #~~~~',
  637.                               '~~~##   # #   #~~~~',
  638.                               '~~~~#####@#####~~~~',
  639.                               '~~~~~~~~###~~~~~~~~',
  640.                               NIL);
  641.  Tab039:Array[0..11]of PChar=('~~~~~~####~',
  642.                               '####### @#~',
  643.                               '#     $  #~',
  644.                               '#   $## $#~',
  645.                               '##$#...# #~',
  646.                               '~# $...  #~',
  647.                               '~# #. .# ##',
  648.                               '~#   # #$ #',
  649.                               '~#$  $    #',
  650.                               '~#  #######',
  651.                               '~####~~~~~~',
  652.                               NIL);
  653.  Tab040:Array[0..16]of PChar=('~~~~~~~~~~~~~######',
  654.                               '~#############....#',
  655.                               '##   ##     ##....#',
  656.                               '#  $$##  $ @##....#',
  657.                               '#      $$ $#  ....#',
  658.                               '#  $ ## $$ # # ...#',
  659.                               '#  $ ## $  #  ....#',
  660.                               '## ##### ### ##.###',
  661.                               '##   $  $ ##   .  #',
  662.                               '# $###  # ##### ###',
  663.                               '#   $   #       #~~',
  664.                               '#  $ #$ $ $###  #~~',
  665.                               '# $$$# $   #~####~~',
  666.                               '#    #  $$ #~~~~~~~',
  667.                               '######   ###~~~~~~~',
  668.                               '~~~~~#####~~~~~~~~~',
  669.                               NIL);
  670.  Tab041:Array[0..16]of PChar=('~~~~############~',
  671.                               '~~~~#          ##',
  672.                               '~~~~#  # #$$ $  #',
  673.                               '~~~~#$ #$#  ## @#',
  674.                               '~~~## ## # $ # ##',
  675.                               '~~~#   $ #$  # #~',
  676.                               '~~~#   # $   # #~',
  677.                               '~~~## $ $   ## #~',
  678.                               '~~~#  #  ##  $ #~',
  679.                               '~~~#    ## $$# #~',
  680.                               '######$$   #   #~',
  681.                               '#....#  ########~',
  682.                               '#.#... ##~~~~~~~~',
  683.                               '#....   #~~~~~~~~',
  684.                               '#....   #~~~~~~~~',
  685.                               '#########~~~~~~~~',
  686.                               NIL);
  687.  Tab042:Array[0..15]of PChar=('~~~~~~~~~~~#####~~~',
  688.                               '~~~~~~~~~~##   ##~~',
  689.                               '~~~~~~~~~##     #~~',
  690.                               '~~~~~~~~##  $$  #~~',
  691.                               '~~~~~~~## $$  $ #~~',
  692.                               '~~~~~~~# $    $ #~~',
  693.                               '####~~~#   $$ #####',
  694.                               '#  ######## ##    #',
  695.                               '#.            $$$@#',
  696.                               '#.# ####### ##   ##',
  697.                               '#.# #######. #$ $##',
  698.                               '#........... #    #',
  699.                               '##############  $ #',
  700.                               '~~~~~~~~~~~~~##  ##',
  701.                               '~~~~~~~~~~~~~~####~',
  702.                               NIL);
  703.  Tab043:Array[0..13]of PChar=('~~~~~########~~~~~',
  704.                               '~~####      ######',
  705.                               '~~#    ## $ $   @#',
  706.                               '~~# ## ##$#$ $ $##',
  707.                               '### ......#  $$ ##',
  708.                               '#   ......#  #   #',
  709.                               '# # ......#$  $  #',
  710.                               '# #$...... $$# $ #',
  711.                               '#   ### ###$  $ ##',
  712.                               '###  $  $  $  $ #~',
  713.                               '~~#  $  $  $  $ #~',
  714.                               '~~######   ######~',
  715.                               '~~~~~~~#####~~~~~~',
  716.                               NIL);
  717.  Tab044:Array[0..11]of PChar=('~~~~~~~~#######~~~~',
  718.                               '~~~~#####  #  ####~',
  719.                               '~~~~#   #   $    #~',
  720.                               '~#### #$$ ## ##  #~',
  721.                               '##      # #  ## ###',
  722.                               '#  ### $#$  $  $  #',
  723.                               '#...    # ##  #   #',
  724.                               '#...#    @ # ### ##',
  725.                               '#...#  ###  $  $  #',
  726.                               '########~##   #   #',
  727.                               '~~~~~~~~~~#########',
  728.                               NIL);
  729.  Tab045:Array[0..15]of PChar=('~#####~~~~~~~~~~~~~',
  730.                               '~#   #~~~~~~~~~~~~~',
  731.                               '~# # #######~~~~~~~',
  732.                               '~#      $@######~~~',
  733.                               '~# $ ##$ ###   #~~~',
  734.                               '~# #### $    $ #~~~',
  735.                               '~# ##### #  #$ ####',
  736.                               '##  #### ##$      #',
  737.                               '#  $#  $  # ## ## #',
  738.                               '#         # #...# #',
  739.                               '######  ###  ...  #',
  740.                               '~~~~~####~# #...# #',
  741.                               '~~~~~~~~~~# ### # #',
  742.                               '~~~~~~~~~~#       #',
  743.                               '~~~~~~~~~~#########',
  744.                               NIL);
  745.  Tab046:Array[0..16]of PChar=('##########~~~~',
  746.                               '#        ####~',
  747.                               '# ###### #  ##',
  748.                               '# # $ $ $  $ #',
  749.                               '#       #$   #',
  750.                               '###$  $$#  ###',
  751.                               '~~#  ## # $##~',
  752.                               '~~##$#   $ @#~',
  753.                               '~~~#  $ $ ###~',
  754.                               '~~~# #   $  #~',
  755.                               '~~~# ##   # #~',
  756.                               '~~##  ##### #~',
  757.                               '~~#         #~',
  758.                               '~~#.......###~',
  759.                               '~~#.......#~~~',
  760.                               '~~#########~~~',
  761.                               NIL);
  762.  Tab047:Array[0..11]of PChar=('~~~~~~~~~####~~~~~',
  763.                               '~#########  ##~~~~',
  764.                               '##  $      $ #####',
  765.                               '#   ## ##   ##...#',
  766.                               '# #$$ $ $$#$##...#',
  767.                               '# #   @   #   ...#',
  768.                               '#  $# ###$$   ...#',
  769.                               '# $  $$  $ ##....#',
  770.                               '###$       #######',
  771.                               '~~#  #######~~~~~~',
  772.                               '~~####~~~~~~~~~~~~',
  773.                               NIL);
  774.  Tab048:Array[0..16]of PChar=('~~#########~~',
  775.                               '~~#*.*#*.*#~~',
  776.                               '~~#.*.*.*.#~~',
  777.                               '~~#*.*.*.*#~~',
  778.                               '~~#.*.*.*.#~~',
  779.                               '~~#*.*.*.*#~~',
  780.                               '~~###   ###~~',
  781.                               '~~~~#   #~~~~',
  782.                               '###### ######',
  783.                               '#           #',
  784.                               '# $ $ $ $ $ #',
  785.                               '## $ $ $ $ ##',
  786.                               '~#$ $ $ $ $#~',
  787.                               '~#   $@$   #~',
  788.                               '~#  #####  #~',
  789.                               '~####~~~####~',
  790.                               NIL);
  791.  Tab049:Array[0..15]of PChar=('~~~~~~~####~~~~~',
  792.                               '~~~~~~~#  ##~~~~',
  793.                               '~~~~~~~#   ##~~~',
  794.                               '~~~~~~~# $$ ##~~',
  795.                               '~~~~~###$  $ ##~',
  796.                               '~~####    $   #~',
  797.                               '###  # #####  #~',
  798.                               '#    # #....$ #~',
  799.                               '# #   $ ....# #~',
  800.                               '#  $ # #.*..# #~',
  801.                               '###  #### ### #~',
  802.                               '~~#### @$  ##$##',
  803.                               '~~~~~### $     #',
  804.                               '~~~~~~~#  ##   #',
  805.                               '~~~~~~~#########',
  806.                               NIL);
  807.  Tab050:Array[0..16]of PChar=('~~~~~~############~',
  808.                               '~~~~~##..    #   #~',
  809.                               '~~~~##..* $    $ #~',
  810.                               '~~~##..*.# # # $##~',
  811.                               '~~~#..*.# # # $  #~',
  812.                               '####...#  #    # #~',
  813.                               '#  ## #          #~',
  814.                               '# @$ $ ###  #   ##~',
  815.                               '# $   $   # #   #~~',
  816.                               '###$$   # # # # #~~',
  817.                               '~~#   $   # # #####',
  818.                               '~~# $# #####      #',
  819.                               '~~#$   #~~~#    # #',
  820.                               '~~#  ###~~~##     #',
  821.                               '~~#  #~~~~~~#    ##',
  822.                               '~~####~~~~~~######~',
  823.                               NIL);
  824.  Tab051:Array[0..12]of PChar=('#########~~~~',
  825.                               '#       #~~~~',
  826.                               '#  $   $#~~~~',
  827.                               '####    #~~~~',
  828.                               '~~~# $  ##~~~',
  829.                               '####   $ #~~~',
  830.                               '#.. $ ## ####',
  831.                               '#..  $##    #',
  832.                               '#..    $    #',
  833.                               '#.###$### #@#',
  834.                               '#.#~#     ###',
  835.                               '###~#######~~',
  836.                               NIL);
  837.  Tab052:Array[0..12]of PChar=('####################',
  838.                               '#  ##########     @#',
  839.                               '# $#    #     ######',
  840.                               '#      ####   #  ###',
  841.                               '#####         #  ###',
  842.                               '#   $         #  ###',
  843.                               '#  $####  #   #    #',
  844.                               '# # #  #..#$###  # #',
  845.                               '# # #$ #..#  $  $$ #',
  846.                               '#      #..#  #   # #',
  847.                               '#   #  #..#  #   # #',
  848.                               '####################',
  849.                               NIL);
  850.  Tab053:Array[0..12]of PChar=('####################',
  851.                               '#                ###',
  852.                               '# $#   $ ##  $    ##',
  853.                               '#    $###    # $$ ##',
  854.                               '#.###     $ $ ##  ##',
  855.                               '#...#  #  #    #$  #',
  856.                               '#..##$$#### $  #   #',
  857.                               '#...#      $ ##  ###',
  858.                               '#...$  ###  #    # #',
  859.                               '##..  $#  ##   ##@ #',
  860.                               '###.#              #',
  861.                               '####################',
  862.                               NIL);
  863.  Tab054:Array[0..12]of PChar=('####################',
  864.                               '#   #    #   #   #@#',
  865.                               '# $      $   $   # #',
  866.                               '## ###..## ###     #',
  867.                               '#   #....#$#  $### #',
  868.                               '# $ #....#  $  $ $ #',
  869.                               '#   #....# # # $ $ #',
  870.                               '#   ##..##   #$#   #',
  871.                               '##$##    ##  #  #$##',
  872.                               '#   $  $     #  #  #',
  873.                               '#   #    #   #     #',
  874.                               '####################',
  875.                               NIL);
  876.  Tab055:Array[0..12]of PChar=('####################',
  877.                               '#    @##      #   ##',
  878.                               '#    ##    $    $ ##',
  879.                               '#  ###....# # #  ###',
  880.                               '#   #....# # # $   #',
  881.                               '### #...#  #       #',
  882.                               '##  ##.#     $   $ #',
  883.                               '##  $ $ ###  # # ###',
  884.                               '## $       # # $   #',
  885.                               '#### $  $# # # # $ #',
  886.                               '####         # #  ##',
  887.                               '####################',
  888.                               NIL);
  889.  Tab056:Array[0..12]of PChar=('####################',
  890.                               '#  #  ##    #   @###',
  891.                               '##    $    # $###  #',
  892.                               '##$# $ ##$# $ $    #',
  893.                               '#   $#    $      ###',
  894.                               '# ##   $ ###  #....#',
  895.                               '# # $# # # # #....##',
  896.                               '#    $ $ #  #....###',
  897.                               '##$ ###  $ #....####',
  898.                               '#  # $        ######',
  899.                               '#      # #    ######',
  900.                               '####################',
  901.                               NIL);
  902.  Tab057:Array[0..12]of PChar=('####################',
  903.                               '#@     ###   #  #  #',
  904.                               '# # #  #  $  $     #',
  905.                               '#####     # $ $#$# #',
  906.                               '#.#..#    ##$ $    #',
  907.                               '#.....    $   #   ##',
  908.                               '#.....    ###$##$###',
  909.                               '#.#..#    $    #   #',
  910.                               '#####     #  #$  $ #',
  911.                               '#####  #  $    $ $ #',
  912.                               '#####  #  #  #  #  #',
  913.                               '####################',
  914.                               NIL);
  915.  Tab058:Array[0..12]of PChar=('####################',
  916.                               '##...   ## #    #  #',
  917.                               '#....         $ ## #',
  918.                               '#....# # #$###$    #',
  919.                               '#...#    #       # #',
  920.                               '##.#  #$ #     $## #',
  921.                               '#  #  # $ $ ###  $ #',
  922.                               '#     $  $ #  # ## #',
  923.                               '## # ## #$$# $#  # #',
  924.                               '#  #   $ $ #      ##',
  925.                               '#    #     #  #   @#',
  926.                               '####################',
  927.                               NIL);
  928.  
  929.  Tab059:Array[0..12]of PChar=('####################',
  930.                               '#   #  #@# ##  #####',
  931.                               '# # #  $    $  #####',
  932.                               '# #    ###### $  ###',
  933.                               '#   #  #....#  $$  #',
  934.                               '##$##$##....#      #',
  935.                               '#      #....##$##$##',
  936.                               '#  $$  #....#      #',
  937.                               '# $  $  #  #  ###  #',
  938.                               '#####  $   $    $  #',
  939.                               '##### #    #  #   ##',
  940.                               '####################',
  941.                               NIL);
  942.  Tab060:Array[0..12]of PChar=('####################',
  943.                               '#     ###..###     #',
  944.                               '# $$  ###..###  $@ #',
  945.                               '#  # ##......#  $  #',
  946.                               '#     #......#  $  #',
  947.                               '####  ###..######$ #',
  948.                               '#   $$$ #..#    #  #',
  949.                               '# $#   $  $  $$ #$ #',
  950.                               '#  #  ## $  ##  #  #',
  951.                               '# $    $ ## $    $ #',
  952.                               '#  #  ##    ##  #  #',
  953.                               '####################',
  954.                               NIL);
  955.  Tab061:Array[0..12]of PChar=('####################',
  956.                               '#    #  # #  #  #  #',
  957.                               '# @# # ## $   $   ##',
  958.                               '#### #    #  # $   #',
  959.                               '#    # ## #$ ## ## #',
  960.                               '#      $   $   $   #',
  961.                               '#..###$$## $##$ ## #',
  962.                               '#..#.#  # $   $ #  #',
  963.                               '#....# $$   ##$ ####',
  964.                               '#....#  #####      #',
  965.                               '#...###        ##  #',
  966.                               '####################',
  967.                               NIL);
  968.  Tab062:Array[0..12]of PChar=('####################',
  969.                               '#....#       #  #  #',
  970.                               '#....# # $  $      #',
  971.                               '#.... ##  $# # $#$ #',
  972.                               '#...#   $   $#  $  #',
  973.                               '#..####  # $   $$  #',
  974.                               '#      #### #### ###',
  975.                               '#        #   #     #',
  976.                               '# ##   #   $ # $ $ #',
  977.                               '# ##    $ ## $  $  #',
  978.                               '#     @#     #   # #',
  979.                               '####################',
  980.                               NIL);
  981.  Tab063:Array[0..12]of PChar=('####################',
  982.                               '#....###           #',
  983.                               '#....##### #  #$# ##',
  984.                               '#....###   #$  $   #',
  985.                               '#....###    $  #$$##',
  986.                               '##  #### $#  #$ $  #',
  987.                               '##  ####  $  $  #  #',
  988.                               '#@  ####$###$## $  #',
  989.                               '##        #  #  $  #',
  990.                               '##   ###  #  $  ####',
  991.                               '########  #  #     #',
  992.                               '####################',
  993.                               NIL);
  994.  Tab064:Array[0..12]of PChar=('####################',
  995.                               '#     #     @#...###',
  996.                               '#     #      ##...##',
  997.                               '# # # ##$## ## ....#',
  998.                               '#   $ #   $$$  ....#',
  999.                               '###$### $$  ### ##.#',
  1000.                               '#     $  #    # ####',
  1001.                               '#  $  #  ###  # #  #',
  1002.                               '## #$##    $  $$   #',
  1003.                               '#   $ ##   #  # #  #',
  1004.                               '#     #    #  #    #',
  1005.                               '####################',
  1006.                               NIL);
  1007.  Tab065:Array[0..12]of PChar=('####################',
  1008.                               '#     #  #...#@    #',
  1009.                               '# #       ....#    #',
  1010.                               '#  $  #   #....#   #',
  1011.                               '# ##$#### ##....#  #',
  1012.                               '# $   $  #  #...#  #',
  1013.                               '# $$ #   #   # $$  #',
  1014.                               '###  $$$#   $$  $  #',
  1015.                               '# $  #  #    # $#  #',
  1016.                               '#   $#  #       $  #',
  1017.                               '#  #    #    #  #  #',
  1018.                               '####################',
  1019.                               NIL);
  1020.  Tab066:Array[0..12]of PChar=('####################',
  1021.                               '#####@###.##...##  #',
  1022.                               '#####$  ..#...#    #',
  1023.                               '####    ......#  $ #',
  1024.                               '###  $ #.....## # ##',
  1025.                               '##  $$# #####  $ $ #',
  1026.                               '## $# $    ##  $$  #',
  1027.                               '##  #  #    # $  $ #',
  1028.                               '##   $$ ### #$##   #',
  1029.                               '## $#      $ $  $ ##',
  1030.                               '###    #    #    ###',
  1031.                               '####################',
  1032.                               NIL);
  1033.  Tab067:Array[0..12]of PChar=('####################',
  1034.                               '#@     #   #       #',
  1035.                               '## ### ##  #### # ##',
  1036.                               '#    # #  $$       #',
  1037.                               '#  # # # $ # $ ## ##',
  1038.                               '#     $ #  #$$ #   #',
  1039.                               '#  ###  #      ## ##',
  1040.                               '#..#.# $ #  $ #    #',
  1041.                               '#..#.#  $ # ## $$  #',
  1042.                               '#....##   $$  $  # #',
  1043.                               '#.....##        #  #',
  1044.                               '####################',
  1045.                               NIL);
  1046.  Tab068:Array[0..12]of PChar=('####################',
  1047.                               '#  #      #   #   ##',
  1048.                               '# $# $ $ ##...$  $ #',
  1049.                               '#  $  # ##....# $  #',
  1050.                               '# ## $ ##....#   $ #',
  1051.                               '# $    #....## $   #',
  1052.                               '# $##  #...#       #',
  1053.                               '#   $$$##$##  ### ##',
  1054.                               '# # #  #   #  #    #',
  1055.                               '# $ #  $  ##       #',
  1056.                               '#    #    #@       #',
  1057.                               '####################',
  1058.                               NIL);
  1059.  Tab069:Array[0..12]of PChar=('####################',
  1060.                               '#  #  # #    #  #  #',
  1061.                               '#   $      $ $     #',
  1062.                               '## #  #$###$##  ## #',
  1063.                               '#   $     $  #  $  #',
  1064.                               '# ###$##$#   # $   #',
  1065.                               '# #   $ $  ###### $#',
  1066.                               '# $  $$ $  #@#.#...#',
  1067.                               '# #     #  # #.#...#',
  1068.                               '# ########## #.....#',
  1069.                               '#            #.....#',
  1070.                               '####################',
  1071.                               NIL);
  1072.  Tab070:Array[0..12]of PChar=('####################',
  1073.                               '#  #     #  ##    ##',
  1074.                               '# $#   $ #     ##  #',
  1075.                               '# $  $  #..#     $ #',
  1076.                               '# $ $  #....#   # ##',
  1077.                               '# $#  #......### $ #',
  1078.                               '#   #  #....#  #$  #',
  1079.                               '# $  ####..#   #   #',
  1080.                               '## $   ## # # $  $##',
  1081.                               '### $    $#@$ $#   #',
  1082.                               '####   #       #   #',
  1083.                               '####################',
  1084.                               NIL);
  1085.  Tab071:Array[0..12]of PChar=('####################',
  1086.                               '#      ....#    ####',
  1087.                               '#      ....        #',
  1088.                               '# # ##########     #',
  1089.                               '# #$   #      ###..#',
  1090.                               '#  $   #$$###   #..#',
  1091.                               '# $ ### $   $   #..#',
  1092.                               '# $ #   $ $ #  ##..#',
  1093.                               '#  #  $$ # $ ##   ##',
  1094.                               '#@## $#  $  $     ##',
  1095.                               '##       ##   #  ###',
  1096.                               '####################',
  1097.                               NIL);
  1098.  Tab072:Array[0..12]of PChar=('####################',
  1099.                               '#        #   #@ #  #',
  1100.                               '# $$  #$$# # #  ## #',
  1101.                               '#  # $ $ #$$ #     #',
  1102.                               '## #  #  # # #  #  #',
  1103.                               '#   ##       #     #',
  1104.                               '#   # $ #   #   #  #',
  1105.                               '# $ #$ #   #  $ #..#',
  1106.                               '##$ #  ####    #...#',
  1107.                               '#  $          #....#',
  1108.                               '#   #  #     #.....#',
  1109.                               '####################',
  1110.                               NIL);
  1111.  Tab073:Array[0..12]of PChar=('####################',
  1112.                               '#     #   #####    #',
  1113.                               '## $  #   ####  $  #',
  1114.                               '#### $$   #..#  #  #',
  1115.                               '#  $  $  ##..#### ##',
  1116.                               '# $   ###....   $$ #',
  1117.                               '#  #$#   ....# # $ #',
  1118.                               '# #  # $ ..###$#   #',
  1119.                               '# #   $ #..#   ##  #',
  1120.                               '#   $#  ####   # $##',
  1121.                               '# #  #    @#      ##',
  1122.                               '####################',
  1123.                               NIL);
  1124.  Tab074:Array[0..12]of PChar=('####################',
  1125.                               '#   #   #    #   #@#',
  1126.                               '#   $  $     # $ # #',
  1127.                               '##$# $### #    $$# #',
  1128.                               '#  #  #.###  #$ $  #',
  1129.                               '#  #$#....#  # ### #',
  1130.                               '# $  #.....##    # #',
  1131.                               '##$  #.#....#$$ $  #',
  1132.                               '#  ######..## #  # #',
  1133.                               '#  $         $ ### #',
  1134.                               '#   #   #        # #',
  1135.                               '####################',
  1136.                               NIL);
  1137.  Tab075:Array[0..12]of PChar=('####################',
  1138.                               '# # # #   #@##   # #',
  1139.                               '#             $    #',
  1140.                               '#  ##$# ##### $ # ##',
  1141.                               '##    ##.....#  #  #',
  1142.                               '##$##$#.....###$#$ #',
  1143.                               '#   # ##.....#  # ##',
  1144.                               '#  $    ##..##  #  #',
  1145.                               '# $ #   $   $  $$$ #',
  1146.                               '## $  $# #  #  $   #',
  1147.                               '#   ##   #  #      #',
  1148.                               '####################',
  1149.                               NIL);
  1150.  Tab076:Array[0..13]of PChar=('######~~#####~',
  1151.                               '#    #~~#   #~',
  1152.                               '# $  #### $ #~',
  1153.                               '# $      $  #~',
  1154.                               '#  ###@###$ #~',
  1155.                               '########## ###',
  1156.                               '#..   ##     #',
  1157.                               '#..   ##$    #',
  1158.                               '#..   ## $   #',
  1159.                               '#..   ## $   #',
  1160.                               '#..     $ $  #',
  1161.                               '###  #########',
  1162.                               '~~####~~~~~~~~',
  1163.                               NIL);
  1164.  Tab077:Array[0..12]of PChar=('~~~~~~~###########~',
  1165.                               '~~~~~~~#         #~',
  1166.                               '~~~~~~~#    $ $  #~',
  1167.                               '######~# $ ##### #~',
  1168.                               '#    ##### $  ##$#~',
  1169.                               '#       $ $      #~',
  1170.                               '#          ## ## #~',
  1171.                               '#    ##@##### ## #~',
  1172.                               '#    ####~~~# ## ##',
  1173.                               '#....#~~~~~~# $   #',
  1174.                               '#....#~~~~~~#     #',
  1175.                               '######~~~~~~#######',
  1176.                               NIL);
  1177.  Tab078:Array[0..12]of PChar=('#############~~~~~~',
  1178.                               '#           #~~~~~~',
  1179.                               '# ### $$    #~~~~~~',
  1180.                               '#   # $  $  #~~~~~~',
  1181.                               '#  $####$######~~~~',
  1182.                               '# $ ##        #####',
  1183.                               '#  $$ $        ...#',
  1184.                               '### ## $$#     ...#',
  1185.                               '~~# ##   #     ...#',
  1186.                               '~~#      #     ...#',
  1187.                               '~~###@#############',
  1188.                               '~~~~###~~~~~~~~~~~~',
  1189.                               NIL);
  1190.  Tab079:Array[0..13]of PChar=('~~#################',
  1191.                               '###@##         ...#',
  1192.                               '#    #         ...#',
  1193.                               '# $  #         ...#',
  1194.                               '# $$ #         ...#',
  1195.                               '## $ ###$##########',
  1196.                               '~# ###  $ #~~~~~~~~',
  1197.                               '##   $  $ #~~~~~~~~',
  1198.                               '#  $ #  $ #~~~~~~~~',
  1199.                               '# $  #    #~~~~~~~~',
  1200.                               '#  $ #    #~~~~~~~~',
  1201.                               '#    #    #~~~~~~~~',
  1202.                               '###########~~~~~~~~',
  1203.                               NIL);
  1204.  Tab080:Array[0..13]of PChar=('~~~~~~~~~~~~~~#####',
  1205.                               '~~~~~##########   #',
  1206.                               '~~~~~#        #   #',
  1207.                               '~~~~~#  $ $    $$ #',
  1208.                               '~~~~~# ##### ## $ #',
  1209.                               '~~~~~#$$   #$## $ #',
  1210.                               '~~~~~# ### # ##$  #',
  1211.                               '###### ### $ $    #',
  1212.                               '#....        ##   #',
  1213.                               '#....        ######',
  1214.                               '#....        #~~~~~',
  1215.                               '###########@##~~~~~',
  1216.                               '~~~~~~~~~~###~~~~~~',
  1217.                               NIL);
  1218.  Tab081:Array[0..13]of PChar=('~~~~######~~~~~~~',
  1219.                               '~####    #~~~~~~~',
  1220.                               '~#    ## #~~~~~~~',
  1221.                               '~# $     #~~~~~~~',
  1222.                               '### #### ########',
  1223.                               '#  $   $ ##  ...#',
  1224.                               '#   $$ $$    ...#',
  1225.                               '#    $  $##  ...#',
  1226.                               '##@## ## ##  ...#',
  1227.                               '~###  $  ########',
  1228.                               '~#   $$  #~~~~~~~',
  1229.                               '~#    #  #~~~~~~~',
  1230.                               '~#########~~~~~~~',
  1231.                               NIL);
  1232.  Tab082:Array[0..13]of PChar=('#######~#########',
  1233.                               '#     #~#   ##  #',
  1234.                               '# ### #~#   $   #',
  1235.                               '# # $ ###   $   #',
  1236.                               '#   $$      ##$ #',
  1237.                               '#    ####   ##  #',
  1238.                               '#@############ ##',
  1239.                               '###..    #####$ #',
  1240.                               '~~#..    ####   #',
  1241.                               '~~#..       $$  #',
  1242.                               '~~#..    #### $ #',
  1243.                               '~~#..    #~~#   #',
  1244.                               '~~########~~#####',
  1245.                               NIL);
  1246.  Tab083:Array[0..12]of PChar=('#######~~~~~~~~~',
  1247.                               '#     ##########',
  1248.                               '#     #    #  ##',
  1249.                               '# $   #   $ $  #',
  1250.                               '#  $  #  $ ##  #',
  1251.                               '# $$  ##$ $    #',
  1252.                               '## #  ## #######',
  1253.                               '## #  ##    ...#',
  1254.                               '#  #$       ...#',
  1255.                               '#   $$      ...#',
  1256.                               '#     ##@#  ...#',
  1257.                               '################',
  1258.                               NIL);
  1259.  Tab084:Array[0..16]of PChar=('############~~~~~~~~',
  1260.                               '#      #   ##~~~~~~~',
  1261.                               '# $  $   #  ######~~',
  1262.                               '####  #####      #~~',
  1263.                               '~#..  #     #### #~~',
  1264.                               '~#.####  ####    #~~',
  1265.                               '~#....    #  $ ####~',
  1266.                               '~# ...#   # $$$#  ##',
  1267.                               '###.#### ##  $@$   #',
  1268.                               '#     ##### $ #    #',
  1269.                               '# #.# $      $###$ #',
  1270.                               '# #.########  #  $ #',
  1271.                               '# #..        ##  $ #',
  1272.                               '# # ####### $ # #  #',
  1273.                               '#   #~~~~~#       ##',
  1274.                               '#####~~~~~##########',
  1275.                               NIL);
  1276.  Tab085:Array[0..12]of PChar=('####################',
  1277.                               '# #     #          #',
  1278.                               '#       $  ## ### ##',
  1279.                               '#####  ##   $  $   #',
  1280.                               '##..##  # # $ # #  #',
  1281.                               '#....  $     ##$# ##',
  1282.                               '#....  $#####   #$##',
  1283.                               '##..# #  #   #  $  #',
  1284.                               '###.# #  $   $  # @#',
  1285.                               '##  $  $ #   #  ####',
  1286.                               '##       ###########',
  1287.                               '####################',
  1288.                               NIL);
  1289.  
  1290.  TP:Array[1..85]of Pointer=(@Tab001,@Tab002,@Tab003,@Tab004,@Tab005,
  1291.                             @Tab006,@Tab007,@Tab008,@Tab009,@Tab010,
  1292.                             @Tab011,@Tab012,@Tab013,@Tab014,@Tab015,
  1293.                             @Tab016,@Tab017,@Tab018,@Tab019,@Tab020,
  1294.                             @Tab021,@Tab022,@Tab023,@Tab024,@Tab025,
  1295.                             @Tab026,@Tab027,@Tab028,@Tab029,@Tab030,
  1296.                             @Tab031,@Tab032,@Tab033,@Tab034,@Tab035,
  1297.                             @Tab036,@Tab037,@Tab038,@Tab039,@Tab040,
  1298.                             @Tab041,@Tab042,@Tab043,@Tab044,@Tab045,
  1299.                             @Tab046,@Tab047,@Tab048,@Tab049,@Tab050,
  1300.                             @Tab051,@Tab052,@Tab053,@Tab054,@Tab055,
  1301.                             @Tab056,@Tab057,@Tab058,@Tab059,@Tab060,
  1302.                             @Tab061,@Tab062,@Tab063,@Tab064,@Tab065,
  1303.                             @Tab066,@Tab067,@Tab068,@Tab069,@Tab070,
  1304.                             @Tab071,@Tab072,@Tab073,@Tab074,@Tab075,
  1305.                             @Tab076,@Tab077,@Tab078,@Tab079,@Tab080,
  1306.                             @Tab081,@Tab082,@Tab083,@Tab084,@Tab085);
  1307.  
  1308. Type
  1309.  TPChar=Array[0..10000]of PChar;
  1310.  TByte=Array[0..65520]of Byte;
  1311.  
  1312. Var
  1313.  CurrPtr:^TPChar;Tab:Array[0..1,0..25]of String;
  1314.  NmElem,LenElem,NmFixe,FixeOk,XMan,YMan,Stage:Byte;
  1315.  NmMove:Word;
  1316.  MKey:Array[0..2047]of Word;
  1317.  PosKey,RunP:Word;
  1318.  Run:Boolean;
  1319.  BackgroundScreen:^TByte;
  1320.  TBi:Array[0..1999]of Byte;
  1321.  
  1322. {$IFNDEF FPC}
  1323.  Procedure CursorOff;
  1324.  Var
  1325.   Regs:Registers;
  1326.  Begin
  1327.   Regs.AH:=1;
  1328.   Regs.CH:=32;
  1329.   Regs.CL:=0;
  1330.   Intr($10,Regs);
  1331.  End;
  1332.  
  1333.  Procedure CursorOn;
  1334.  Var
  1335.   Regs:Registers;
  1336.  Begin
  1337.   Regs.AX:=$0100;
  1338.   Regs.CX:=(7 shl 8)+9;
  1339.   Intr($10,Regs);
  1340.  End;
  1341. {$ENDIF}
  1342.  
  1343. Procedure PutWall(X,Y:Byte);Begin
  1344.  Dec(X);
  1345.  TextBackground(Magenta);
  1346.  TextColor(LightGray);
  1347.  GotoXY(1+X,1+Y);
  1348.  Write({$IFDEF FPC}'='{$ELSE}Chr(177){$ENDIF});
  1349. End;
  1350.  
  1351. Procedure PutBrick(X,Y:Byte);Begin
  1352.  Dec(X);
  1353.  TextBackground(Cyan);
  1354.  TextColor(White);
  1355.  GotoXY(1+X,1+Y);
  1356.  Write(' ');
  1357. End;
  1358.  
  1359. Procedure PutBox(X,Y:Byte);Begin
  1360.  Dec(X);
  1361.  TextBackground(DarkGray);
  1362.  TextColor(Brown);
  1363.  GotoXY(1+X,1+Y);
  1364.  Write({$IFDEF FPC}'X'{$ELSE}Chr(254){$ENDIF});
  1365. End;
  1366.  
  1367.  
  1368. Procedure PutFixe(X,Y:Byte);Begin
  1369.  Dec(X);
  1370.  TextBackground(DarkGray);
  1371.  TextColor(LightGray);
  1372.  GotoXY(1+X,1+Y);
  1373.  Write('.');
  1374. End;
  1375.  
  1376. Procedure UnSetMan(X,Y:Byte);Begin
  1377.  Case Tab[0][Y][X]of
  1378.   '#':PutWall(X,Y);
  1379.   ' ':PutBrick(X,Y);
  1380.   '$':PutBox(X,Y);
  1381.   '.':PutFixe(X,Y);
  1382.  End;
  1383. End;
  1384.  
  1385. Procedure PutMove;Begin
  1386.  GotoXY(34,25);
  1387.  TextBackground($F);
  1388.  TextColor($C);
  1389.  If(Run)Then Write(RunP)
  1390.         Else Write(NmMove);
  1391. End;
  1392.  
  1393. Procedure PutX(X,Y:Integer);Begin
  1394.  GotoXY(X+1,Y+1);
  1395.  Write(Chr(1));
  1396. End;
  1397.  
  1398. Procedure SetMan(X,Y:Byte);Begin
  1399.  Case Tab[1][Y][X]of
  1400.   '#':PutWall(X,Y);
  1401.   ' ':PutBrick(X,Y);
  1402.   '$':PutBox(X,Y);
  1403.   '.':PutFixe(X,Y);
  1404.  End;
  1405.  Dec(X);
  1406.  PutX(X,Y);
  1407.  If Not(Run)Then Begin
  1408.   If NmMove=65535 Then NmMove:=0
  1409.                   Else Inc(NmMove);
  1410.  End;
  1411.  PutMove;
  1412. End;
  1413.  
  1414. Procedure UnPutBar;
  1415. Var
  1416.  X,Y:Byte;
  1417. Begin
  1418.  X:=(Stage-1)div 17;Y:=(Stage-1)mod 17;
  1419.  TextBackground(Black);
  1420.  TextColor(LightCyan);
  1421.  GotoxY(X*8+1,Y+3+1);
  1422.  Write('  ',Stage,' ':5-Byte(Stage>9));
  1423. End;
  1424.  
  1425. Procedure PutBar;
  1426. Var
  1427.  X,Y:Byte;
  1428. Begin
  1429.  X:=(Stage-1)div 17;Y:=(Stage-1)mod 17;
  1430.  TextBackground(LightCyan);
  1431.  TextColor(Black);
  1432.  GotoxY(X*8+1,Y+3+1);
  1433.  Write('  ',Stage,' ':5-Byte(Stage>9));
  1434. End;
  1435.  
  1436. Function Max(N,M:Byte):Byte;Begin
  1437.  If(N<M)Then Max:=N+1 Else Max:=1;
  1438. End;
  1439.  
  1440. Function Min(N,Max:Byte):Byte;Begin
  1441.  If N>1Then Min:=N-1 Else Min:=Max;
  1442. End;
  1443.  
  1444. Procedure ChoiceLevel;
  1445. Var
  1446.  J:Byte;
  1447.  K:Word;
  1448. Begin
  1449.  TextMode(CO40);
  1450.  TextBackground(Black);
  1451.  ClrScr;
  1452.  CursorOff;
  1453.  GotoXY(15,1);
  1454.  TextColor(Yellow);
  1455.  Write('Quel étage ?');
  1456.  TextColor(LightCyan);
  1457.  For J:=0to 16do Begin
  1458.   GotoXY(3+0,1+3+J);
  1459.   Write(J+1);
  1460.   GotoXY(3+8,1+3+J);
  1461.   Write(J+1+17);
  1462.   GotoXY(3+16,1+3+J);
  1463.   Write(J+1+17+17);
  1464.   GotoXY(3+24,1+3+J);
  1465.   Write(J+1+17+17+17);
  1466.   GotoXY(3+32,1+3+J);
  1467.   Write(J+1+17+17+17+17);
  1468.  End;
  1469.  PutBar;
  1470.  Repeat
  1471.   K:=Byte(ReadKey);
  1472.   If K=0Then K:=K or (Byte(ReadKey)shl 8);
  1473.   Case(K)of
  1474.    kbLeft:Begin
  1475.     UnPutBar;
  1476.     Stage:=Min(Stage-16,85);
  1477.     PutBar;
  1478.    End;
  1479.    kbRight:Begin
  1480.     UnPutBar;
  1481.     Stage:=Max(Stage+16,85);
  1482.     PutBar;
  1483.    End;
  1484.    kbUp:Begin
  1485.     UnPutBar;
  1486.     Stage:=Min(Stage,85);
  1487.     PutBar;
  1488.    End;
  1489.    kbDn:Begin
  1490.     UnPutBar;
  1491.     Stage:=Max(Stage,85);
  1492.     PutBar;
  1493.    End;
  1494.    kbEnter:Break;
  1495.   End;
  1496.  Until False;
  1497. End;
  1498.  
  1499. Procedure MemKey(K:Word);Begin
  1500.  If Not(Run)Then Begin
  1501.   MKey[PosKey]:=K;PosKey:=(PosKey+1)and 2047;
  1502.  End;
  1503. End;
  1504.  
  1505. Procedure Play;
  1506. Label Restart;
  1507. Var
  1508.  I,J,K:Word;
  1509.  Chk:Boolean;
  1510. Begin
  1511.  ClrScr;
  1512.  Repeat
  1513. Restart:
  1514.   PosKey:=0;Run:=False;
  1515.   TextBackground(Green);
  1516.   ClrScr;
  1517.   If Stage<=1Then Begin
  1518.    GotoXY(1,20);
  1519.    Write('F3 = Demonstration');
  1520.   End;
  1521.   GotoXY(1,25);
  1522.   TextColor($C);
  1523.   TextBackground($F);
  1524.   ClrEol;
  1525.   GotoXY(2,25);
  1526.   Write('étage:');
  1527.   GotoXY(9,25);
  1528.   Write(Stage);
  1529.   CurrPtr:=TP[Stage];
  1530.   NmMove:=$FFFF;
  1531.   NmElem:=0;
  1532.   LenElem:=StrLen(CurrPtr^[0]);
  1533.   FillChar(Tab,SizeOf(Tab),0);
  1534.   While(CurrPtr^[NmElem]<>NIL)do Begin
  1535.    Tab[0][NmElem]:=StrPas(CurrPtr^[NmElem]);Tab[1][NmElem]:=StrPas(CurrPtr^[NmElem]);Inc(NmElem)
  1536.   End;
  1537.   FixeOk:=0;NmFixe:=0;
  1538.   For J:=0to NmElem-1do For I:=1to(LenElem)do Begin
  1539.    Case Tab[0][J][I]of
  1540.     '#':PutWall(I,J);
  1541.     ' ':PutBrick(I,J);
  1542.     '$':Begin
  1543.      PutBox(I,J);
  1544.      Tab[1][J][I]:=' ';
  1545.     End;
  1546.     '*':Begin
  1547.      PutBox(I,J);
  1548.      Tab[0][J][I]:='$';Tab[1][J][I]:='.';
  1549.      Inc(FixeOk)
  1550.     End;
  1551.     '.':Begin
  1552.      PutFixe(I,J);
  1553.      Inc(NmFixe)
  1554.     End;
  1555.     '@':Begin
  1556.      XMan:=I;YMan:=J;
  1557.      Tab[0][J][I]:=' ';
  1558.      Tab[1][J][I]:=' ';
  1559.      SetMan(I,J)
  1560.     End;
  1561.    End;
  1562.   End;
  1563.   GotoXY(14,25);
  1564.   TextBackground(White);
  1565.   TextColor(LightRed);
  1566.   Write('Nombre d,placement:');
  1567.   PutMove;
  1568.   Repeat
  1569.    If(Run)Then Begin
  1570.     K:=MKey[RunP];Inc(RunP);
  1571.     If(KeyPressed)or(RunP>=PosKey)Then Begin
  1572.      Run:=False;
  1573.      NmMove:=RunP;
  1574.     End;
  1575.     Delay(100);
  1576.    End
  1577.     Else
  1578.    Begin
  1579.     K:=Byte(ReadKey);
  1580.     If K=0Then K:=K or (Byte(ReadKey)shl 8);
  1581.    End;
  1582.    Case(K)of
  1583.     kbF10:Goto Restart;
  1584.     kbF9:If Stage<85Then Begin;Inc(Stage);Goto Restart;End;
  1585.     kbF8:If Stage>1Then Begin;Dec(Stage);Goto Restart;End;
  1586.     kbF3:If Stage<=1Then Begin
  1587.      RunP:=0;
  1588.      Run:=True;
  1589.      Case Stage of
  1590.       1:Begin
  1591.        Move(Solution001,MKey,SizeOf(Solution001));
  1592.        PosKey:=High(Solution001)+1;
  1593.       End;
  1594.      End;
  1595.     End;
  1596.     kbUp:Case Tab[0][YMan-1][XMan]of
  1597.      ' ','.':Begin
  1598.       UnSetMan(XMan,YMan);
  1599.       Dec(YMan);
  1600.       SetMan(XMan,YMan);
  1601.       MemKey(K);
  1602.      End;
  1603.      '$':If Tab[0][YMan-2][XMan]in[' ','.']Then Begin
  1604.       Chk:=(Tab[1][YMan-1][XMan]=' ')and(Tab[1][YMan-2][XMan]='.');
  1605.       If(Chk)Then Inc(FixeOk);
  1606.       Chk:=(Tab[1][YMan-1][XMan]='.')and(Tab[1][YMan-2][XMan]=' ');
  1607.       If(Chk)Then Dec(FixeOk);
  1608.       Tab[0][YMan-2][XMan]:=Tab[0][YMan-1][XMan];
  1609.       Tab[0][YMan-1][XMan]:=Tab[1][YMan-1][XMan];
  1610.       UnSetMan(XMan,YMan-2);
  1611.       UnSetMan(XMan,YMan);
  1612.       Dec(YMan);
  1613.       SetMan(XMan,YMan);
  1614.       MemKey(K);
  1615.       If(FixeOk=NmFixe)Then Break;
  1616.      End;
  1617.     End;
  1618.     kbDn:Case Tab[0][YMan+1][XMan]of
  1619.      ' ','.':Begin
  1620.       UnSetMan(XMan,YMan);
  1621.       Inc(YMan);
  1622.       SetMan(XMan,YMan);
  1623.       MemKey(K);
  1624.      End;
  1625.      '$':If Tab[0][YMan+2][XMan]in[' ','.']Then Begin
  1626.       Chk:=(Tab[1][YMan+1][XMan]=' ')and(Tab[1][YMan+2][XMan]='.');
  1627.       If(Chk)Then Inc(FixeOk);
  1628.       Chk:=(Tab[1][YMan+1][XMan]='.')and(Tab[1][YMan+2][XMan]=' ');
  1629.       If(Chk)Then Dec(FixeOk);
  1630.       Tab[0][YMan+2][XMan]:=Tab[0][YMan+1][XMan];
  1631.       Tab[0][YMan+1][XMan]:=Tab[1][YMan+1][XMan];
  1632.       UnSetMan(XMan,YMan+2);
  1633.       UnSetMan(XMan,YMan);
  1634.       Inc(YMan);
  1635.       SetMan(XMan,YMan);
  1636.       MemKey(K);
  1637.       If(FixeOk=NmFixe)Then Break;
  1638.      End;
  1639.     End;
  1640.     kbLeft:Case Tab[0][YMan][XMan-1]of
  1641.      ' ','.':Begin
  1642.       UnSetMan(XMan,YMan);
  1643.       Dec(XMan);
  1644.       SetMan(XMan,YMan);
  1645.       MemKey(K);
  1646.      End;
  1647.      '$':If Tab[0][YMan][XMan-2]in[' ','.']Then Begin
  1648.       Chk:=(Tab[1][YMan][XMan-1]=' ')and(Tab[1][YMan][XMan-2]='.');
  1649.       If(Chk)Then Inc(FixeOk);
  1650.       Chk:=(Tab[1][YMan][XMan-1]='.')and(Tab[1][YMan][XMan-2]=' ');
  1651.       If(Chk)Then Dec(FixeOk);
  1652.       Tab[0][YMan][XMan-2]:=Tab[0][YMan][XMan-1];
  1653.       Tab[0][YMan][XMan-1]:=Tab[1][YMan][XMan-1];
  1654.       UnSetMan(XMan-2,YMan);
  1655.       UnSetMan(XMan,YMan);
  1656.       Dec(XMan);
  1657.       SetMan(XMan,YMan);
  1658.       MemKey(K);
  1659.       If(FixeOk=NmFixe)Then Break;
  1660.      End;
  1661.     End;
  1662.     kbRight:Case Tab[0][YMan][XMan+1]of
  1663.      ' ','.':Begin
  1664.       UnSetMan(XMan,YMan);
  1665.       Inc(XMan);
  1666.       SetMan(XMan,YMan);
  1667.       MemKey(K);
  1668.      End;
  1669.      '$':If Tab[0][YMan][XMan+2]in[' ','.']Then Begin
  1670.       Chk:=(Tab[1][YMan][XMan+1]=' ')and(Tab[1][YMan][XMan+2]='.');
  1671.       If(Chk)Then Inc(FixeOk);
  1672.       Chk:=(Tab[1][YMan][XMan+1]='.')and(Tab[1][YMan][XMan+2]=' ');
  1673.       If(Chk)Then Dec(FixeOk);
  1674.       Tab[0][YMan][XMan+2]:=Tab[0][YMan][XMan+1];
  1675.       Tab[0][YMan][XMan+1]:=Tab[1][YMan][XMan+1];
  1676.       UnSetMan(XMan+2,YMan);
  1677.       UnSetMan(XMan,YMan);
  1678.       Inc(XMan);
  1679.       SetMan(XMan,YMan);
  1680.       MemKey(K);
  1681.       If(FixeOk=NmFixe)Then Break;
  1682.      End;
  1683.     End;
  1684.     kbEsc:Break;
  1685.    End;
  1686.   Until False;
  1687.   If(K<>kbEsc)Then Begin
  1688.    GotoXY(1,24);
  1689.    TextBackground($F);
  1690.    TextColor(0);
  1691.    ClrEol;
  1692.    GotoXY(1,25);
  1693.    ClrEol;
  1694.    GotoXY(1,24);
  1695.    Write('tage',Stage,' fait!!!');
  1696.    GotoXY(1,25);
  1697.    Write('Presse une touche pour continuer');
  1698.    Inc(Stage);
  1699.    If Stage=86Then Begin
  1700.     TextBackground(0);
  1701.     TextColor($F);
  1702.     GotoXY(1,12);
  1703.     Write('Tous les ,tages sont fait!!!');
  1704.     GotoXY(1,25);
  1705.     TextBackground($F);
  1706.     TextColor(0);
  1707.     ClrEol;
  1708.     Write('Presse une touche pour quitter');
  1709.     ReadKey;
  1710.     Break;
  1711.    End;
  1712.   End;
  1713.  Until K=kbEsc;
  1714. End;
  1715.  
  1716. BEGIN
  1717.  Stage:=1;
  1718.  ChoiceLevel;
  1719.  Play;
  1720.  TextBackground(Black);
  1721.  TextColor(7);
  1722.  ClrScr;
  1723. END.
  1724.  

Code source

Voici le code source du jeu sur GitHub :

Lien Langage de programmation Projet
https://github.com/gladir/7iles/blob/main/SOKOBAN.PAS Turbo Pascal, Free Pascal 7iles


Dernière mise à jour : Jeudi, le 28 juillet 2022