muffe публичная бета 2, с глюками и недоработками.
Слово muffe — как оказалось с немецкого это муфта. Но придумывалось как исковерканное слово move и coffee.
В игре присутствуют отличия от оригинальной игры 2048.
Так как алгоритм разрабатывал вслепую. Тыкал и смотрел что выходит. Пытался повторить это в командной строке cmd batch-файлом.
В начале игры появляются две 2-ки. Четверки пока не появляются. 2-ки появляются после каждого нажатия кнопки, даже если не произошло смещение и/или сложение. Заметил что иногда смещение влево глючит. Не всегда смещаются и складываются. Редко, но бывает. Не показывает общий счет. Перед появлением новой двойки проверяются пустые клетки. И если проверка повторялась 50 раз, игра закрывается. Не хотелось раздувать батник, поэтому перемещение и сложение выделил в отдельные файлы, которые вызываю при помощи CALL. На каждое направление свой отдельный файл.
WASD — выбираем направление, стрелочки так и не получилось заставить.
X — выход из игры в любой момент, если только не зависла. Тогда можно просто закрыть окно cmd.
R — начать заново, в любой момент.
Сам не программист, и наверно допустил много глупостей. Но главное что работает. На все это потратил уже 2 недели. Вдумчиво рассматривал исходный код странички coffee2048.com, мало чего понял. За то упорно изучал командную строку и создание батников. Мне еще на первом компе 386 нравилось писать autoexec.bat и config.sys для запуска игр. Иногда этот процесс был интересней самой игры. Еще вдохновился шуткой от Microsoft на 1 апреля. MS-DOS для Windows Phone там понравилась камера и танцы с бубном, что бы запустить игру «камень-ножницы-бумага». Cortana прикольно помогает.
Были проблемы с dynamic variable. сначала нужно было понять, что это такое и с чем это едят, а потом найти как это можно использовать в cmd. Еще были проблемы с IF. Как оказалось туда можно вставлять только дно действие. Пришлось использовать GOTO. Не получилось использовать цикл FOR. Вышел из ситуации с помощью IF и GOTO.
Не меняется цвет ячеек. хотя я видел такое. Но пока не понял как это сделать. Для управление в игре использовал команду CHOICE. Пока искал как отдавать команды игре, наткнулся на игру змейку тоже в батнике. Там управление передавалось через SET /P но я так и не понял как вводить буквы и не нажимать после этого ВВОД. Остановился на CHOICE. Хотя мне не нравится то что эта команда пищит, иногда очень громко, если нажата клавиша которая не обозначена в «choice /C wasdxr /N >nul».
@echo off :Begin1 cls SETLOCAL ENABLEDELAYEDEXPANSION set "echo2=echo ____ ____ ____ ____" ::::::::::::::::::::::::::::::::::::::::::::::: set contentR11=0 set content11=___%contentR11% set contentR12=0 set content12=___%contentR12% set contentR13=0 set content13=___%contentR13% set contentR14=0 set content14=___%contentR14% ::::::::::::::::::::::::::::::::::::::::::::::: set contentR21=0 set content21=___%contentR21% set contentR22=0 set content22=___%contentR22% set contentR23=0 set content23=___%contentR23% set contentR24=0 set content24=___%contentR24% ::::::::::::::::::::::::::::::::::::::::::::::: set contentR31=0 set content31=___%contentR31% set contentR32=0 set content32=___%contentR32% set contentR33=0 set content33=___%contentR33% set contentR34=0 set content34=___%contentR34% ::::::::::::::::::::::::::::::::::::::::::::::: set contentR41=0 set content41=___%contentR41% set contentR42=0 set content42=___%contentR42% set contentR43=0 set content43=___%contentR43% set contentR44=0 set content44=___%contentR44% ::::::::::::::::::::::::::::::::::::::::::::::: set /a "X=%RANDOM% * 4 / 32768 + 1" set /a "Y=%RANDOM% * 4 / 32768 + 1" set contentR%Y%%X%=2 set content%Y%%X%=___2 ::::::::::::::::::::::::::::::::::::::::::::::: if [%contentR11%] == [0] (set content11=____) if [%contentR12%] == [0] (set content12=____) if [%contentR13%] == [0] (set content13=____) if [%contentR14%] == [0] (set content14=____) if [%contentR21%] == [0] (set content21=____) if [%contentR22%] == [0] (set content22=____) if [%contentR23%] == [0] (set content23=____) if [%contentR24%] == [0] (set content24=____) if [%contentR31%] == [0] (set content31=____) if [%contentR32%] == [0] (set content32=____) if [%contentR33%] == [0] (set content33=____) if [%contentR34%] == [0] (set content34=____) if [%contentR41%] == [0] (set content41=____) if [%contentR42%] == [0] (set content42=____) if [%contentR43%] == [0] (set content43=____) if [%contentR44%] == [0] (set content44=____) :Direction set exitC=0 :Rand set /a "exitC+=1" if [%exitC%] == [50] (goto Exit1) set /a "X=%RANDOM% * 4 / 32768 + 1" set /a "Y=%RANDOM% * 4 / 32768 + 1" set name=contentR%Y%%X% if [!%name%!] == [0] (set %name%=2 ) else (goto Rand) set content%Y%%X%=___2 cls %echo2% echo (%content11%][%content12%][%content13%][%content14%) %echo2% echo (%content21%][%content22%][%content23%][%content24%) %echo2% echo (%content31%][%content32%][%content33%][%content34%) %echo2% echo (%content41%][%content42%][%content43%][%content44%) echo( echo WASD or X or R choice /C wasdxr /N >nul if errorlevel 6 (goto Begin1) if errorlevel 5 (goto Exit1) if errorlevel 4 (goto D4) if errorlevel 3 (goto S3) if errorlevel 2 (goto Aa2) if errorlevel 1 (goto W1) if errorlevel 0 (goto Direction) ::::::::::::::::::::::::::::::::::::::::: :D4 call muffe_D4.bat goto Direction :S3 call muffe_S3.bat goto Direction :Aa2 call muffe_Aa2.bat goto Direction :W1 call muffe_W1.bat goto Direction ::::::::::::::::::::::::::::::::::::::::: :Exit1
содержимое управляющих батников:
:Aa2 ::::::::::::::::::::0::::::::::::::::::::::: set rrnn=1 :PPNNA if [%contentR11%] == [0] (goto PPN12) :RRN12 if [%contentR12%] == [0] (goto PPN13) :RRN13 if [%contentR13%] == [0] (goto PPN14) :RRN14 if [%contentR21%] == [0] (goto PPN22) :RRN22 if [%contentR22%] == [0] (goto PPN23) :RRN23 if [%contentR23%] == [0] (goto PPN24) :RRN24 if [%contentR31%] == [0] (goto PPN32) :RRN32 if [%contentR32%] == [0] (goto PPN33) :RRN33 if [%contentR33%] == [0] (goto PPN34) :RRN34 if [%contentR41%] == [0] (goto PPN42) :RRN42 if [%contentR42%] == [0] (goto PPN43) :RRN43 if [%contentR43%] == [0] (goto PPN44) :RRN44 set /a "rrnn+=1" if [%rrnn%] LEQ [3] (goto PPNNA) :::::::::::::::::::::::1:::::::::: if [%contentR11%] == [%contentR12%] (goto PPR12) :RRP12 if [%contentR12%] == [%contentR13%] (goto PPR13) :RRP13 if [%contentR13%] == [%contentR14%] (goto PPR14) :RRP14 :::::::::::::::::::::::2::::::::::::: if [%contentR21%] == [%contentR22%] (goto PPR22) :RRP22 if [%contentR22%] == [%contentR23%] (goto PPR23) :RRP23 if [%contentR23%] == [%contentR24%] (goto PPR24) :RRP24 :::::::::::::::::::::::3::::::::::::: if [%contentR31%] == [%contentR32%] (goto PPR32) :RRP32 if [%contentR32%] == [%contentR33%] (goto PPR33) :RRP33 if [%contentR33%] == [%contentR34%] (goto PPR34) :RRP34 :::::::::::::::::::::::4:::::::::::::::::: if [%contentR41%] == [%contentR42%] (goto PPR42) :RRP42 if [%contentR42%] == [%contentR43%] (goto PPR43) :RRP43 if [%contentR43%] == [%contentR44%] (goto PPR44) :RRP44 ::::::::::::::::::::0::::::::::::::::::::::: set rrnn=1 :MPPNNA if [%contentR11%] == [0] (goto MPPN12) :MRRN12 if [%contentR12%] == [0] (goto MPPN13) :MRRN13 if [%contentR13%] == [0] (goto MPPN14) :MRRN14 if [%contentR21%] == [0] (goto MPPN22) :MRRN22 if [%contentR22%] == [0] (goto MPPN23) :MRRN23 if [%contentR23%] == [0] (goto MPPN24) :MRRN24 if [%contentR31%] == [0] (goto MPPN32) :MRRN32 if [%contentR32%] == [0] (goto MPPN33) :MRRN33 if [%contentR33%] == [0] (goto MPPN34) :MRRN34 if [%contentR41%] == [0] (goto MPPN42) :MRRN42 if [%contentR42%] == [0] (goto MPPN43) :MRRN43 if [%contentR43%] == [0] (goto MPPN44) :MRRN44 set /a "rrnn+=1" if [%rrnn%] LEQ [3] (goto MPPNNA) exit /B :PPR12 set /a "PP=%contentR11%+%contentR12%" if [%PP%] == [0] (goto RRP12) set contentR11=%PP% set content11=%PP% IF %PP% LSS 1000 set content11=_%PP% IF %PP% LSS 100 set content11=__%PP% IF %PP% LSS 10 set content11=___%PP% set content12=____ set contentR12=0 goto RRP12 :PPR13 set /a "PP=%contentR12%+%contentR13%" if [%PP%] == [0] (goto RRP13) set contentR12=%PP% set content12=%PP% IF %PP% LSS 1000 set content12=_%PP% IF %PP% LSS 100 set content12=__%PP% IF %PP% LSS 10 set content12=___%PP% set content13=____ set contentR13=0 goto RRP13 :PPR14 set /a "PP=%contentR13%+%contentR14%" if [%PP%] == [0] (goto RRP14) set contentR13=%PP% set content13=%PP% IF %PP% LSS 1000 set content13=_%PP% IF %PP% LSS 100 set content13=__%PP% IF %PP% LSS 10 set content13=___%PP% set content14=____ set contentR14=0 goto RRP14 :PPR22 set /a "PP=%contentR21%+%contentR22%" if [%PP%] == [0] (goto RRP22) set contentR21=%PP% set content21=%PP% IF %PP% LSS 1000 set content21=_%PP% IF %PP% LSS 100 set content21=__%PP% IF %PP% LSS 10 set content21=___%PP% set content22=____ set contentR22=0 goto RRP22 :PPR23 set /a "PP=%contentR22%+%contentR23%" if [%PP%] == [0] (goto RRP23) set contentR22=%PP% set content22=%PP% IF %PP% LSS 1000 set content22=_%PP% IF %PP% LSS 100 set content22=__%PP% IF %PP% LSS 10 set content22=___%PP% set content23=____ set contentR23=0 goto RRP23 :PPR24 set /a "PP=%contentR23%+%contentR24%" if [%PP%] == [0] (goto RRP24) set contentR23=%PP% set content23=%PP% IF %PP% LSS 1000 set content23=_%PP% IF %PP% LSS 100 set content23=__%PP% IF %PP% LSS 10 set content23=___%PP% set content24=____ set contentR24=0 goto RRP24 :PPR32 set /a "PP=%contentR31%+%contentR32%" if [%PP%] == [0] (goto RRP32) set contentR31=%PP% set content31=%PP% IF %PP% LSS 1000 set content31=_%PP% IF %PP% LSS 100 set content31=__%PP% IF %PP% LSS 10 set content31=___%PP% set content32=____ set contentR32=0 goto RRP32 :PPR33 set /a "PP=%contentR32%+%contentR33%" if [%PP%] == [0] (goto RRP33) set contentR32=%PP% set content32=%PP% IF %PP% LSS 1000 set content32=_%PP% IF %PP% LSS 100 set content32=__%PP% IF %PP% LSS 10 set content32=___%PP% set content33=____ set contentR33=0 goto RRP33 :PPR34 set /a "PP=%contentR33%+%contentR34%" if [%PP%] == [0] (goto RRP34) set contentR33=%PP% set content33=%PP% IF %PP% LSS 1000 set content33=_%PP% IF %PP% LSS 100 set content33=__%PP% IF %PP% LSS 10 set content33=___%PP% set content34=____ set contentR34=0 goto RRP34 :PPR42 set /a "PP=%contentR41%+%contentR42%" if [%PP%] == [0] (goto RRP42) set contentR41=%PP% set content41=%PP% IF %PP% LSS 1000 set content41=_%PP% IF %PP% LSS 100 set content41=__%PP% IF %PP% LSS 10 set content41=___%PP% set content42=____ set contentR42=0 goto RRP42 :PPR43 set /a "PP=%contentR42%+%contentR43%" if [%PP%] == [0] (goto RRP43) set contentR42=%PP% set content42=%PP% IF %PP% LSS 1000 set content42=_%PP% IF %PP% LSS 100 set content42=__%PP% IF %PP% LSS 10 set content42=___%PP% set content43=____ set contentR43=0 goto RRP43 :PPR44 set /a "PP=%contentR43%+%contentR44%" if [%PP%] == [0] (goto RRP44) set contentR43=%PP% set content43=%PP% IF %PP% LSS 1000 set content43=_%PP% IF %PP% LSS 100 set content43=__%PP% IF %PP% LSS 10 set content43=___%PP% set content44=____ set contentR44=0 goto RRP44 ::::::::::::::0::::::::::::::::::: :PPN12 set content11=%content12% set contentR11=%contentR12% set content12=____ set contentR12=0 goto RRN12 :PPN13 set content12=%content13% set contentR12=%contentR13% set content13=____ set contentR13=0 goto RRN13 :PPN14 set content13=%content14% set contentR13=%contentR14% set content14=____ set contentR14=0 goto RRN14 :PPN22 set content21=%content22% set contentR21=%contentR22% set content22=____ set contentR22=0 goto RRN22 :PPN23 set content22=%content23% set contentR22=%contentR23% set content23=____ set contentR23=0 goto RRN23 :PPN24 set content23=%content24% set contentR23=%contentR24% set content24=____ set contentR24=0 goto RRN24 :PPN32 set content31=%content32% set contentR31=%contentR32% set content32=____ set contentR32=0 goto RRN32 :PPN33 set content32=%content33% set contentR32=%contentR33% set content33=____ set contentR33=0 goto RRN33 :PPN34 set content33=%content34% set contentR33=%contentR34% set content34=____ set contentR34=0 goto RRN34 :PPN42 set content41=%content42% set contentR41=%contentR42% set content42=____ set contentR42=0 goto RRN42 :PPN43 set content42=%content43% set contentR42=%contentR43% set content43=____ set contentR43=0 goto RRN43 :PPN44 set content43=%content44% set contentR43=%contentR44% set content44=____ set contentR44=0 goto RRN44 ::::::::::::::::::::::::::::::::::::::: :MPPN12 set content11=%content12% set contentR11=%contentR12% set content12=____ set contentR12=0 goto MRRN12 :MPPN13 set content12=%content13% set contentR12=%contentR13% set content13=____ set contentR13=0 goto MRRN13 :MPPN14 set content13=%content14% set contentR13=%contentR14% set content14=____ set contentR14=0 goto MRRN14 :MPPN22 set content21=%content22% set contentR21=%contentR22% set content22=____ set contentR22=0 goto MRRN22 :MPPN23 set content22=%content23% set contentR22=%contentR23% set content23=____ set contentR23=0 goto MRRN23 :MPPN24 set content23=%content24% set contentR23=%contentR24% set content24=____ set contentR24=0 goto MRRN24 :MPPN32 set content31=%content32% set contentR31=%contentR32% set content32=____ set contentR32=0 goto MRRN32 :MPPN33 set content32=%content33% set contentR32=%contentR33% set content33=____ set contentR33=0 goto MRRN33 :MPPN34 set content33=%content34% set contentR33=%contentR34% set content34=____ set contentR34=0 goto MRRN34 :MPPN42 set content41=%content42% set contentR41=%contentR42% set content42=____ set contentR42=0 goto MRRN42 :MPPN43 set content42=%content43% set contentR42=%contentR43% set content43=____ set contentR43=0 goto MRRN43 :MPPN44 set content43=%content44% set contentR43=%contentR44% set content44=____ set contentR44=0 goto MRRN44
:D4 ::::::::::::::::::::0::::::::::::::::::::::: set rrnn=1 :PPNN if [%contentR14%] == [0] (goto PPN13) :RRN13 if [%contentR13%] == [0] (goto PPN12) :RRN12 if [%contentR12%] == [0] (goto PPN11) :RRN11 if [%contentR24%] == [0] (goto PPN23) :RRN23 if [%contentR23%] == [0] (goto PPN22) :RRN22 if [%contentR22%] == [0] (goto PPN21) :RRN21 if [%contentR34%] == [0] (goto PPN33) :RRN33 if [%contentR33%] == [0] (goto PPN32) :RRN32 if [%contentR32%] == [0] (goto PPN31) :RRN31 if [%contentR44%] == [0] (goto PPN43) :RRN43 if [%contentR43%] == [0] (goto PPN42) :RRN42 if [%contentR42%] == [0] (goto PPN41) :RRN41 set /a "rrnn+=1" if [%rrnn%] LEQ [3] (goto PPNN) :::::::::::::::::::::::1:::::::::: if [%contentR14%] == [%contentR13%] (goto PPR13) :RRP13 if [%contentR13%] == [%contentR12%] (goto PPR12) :RRP12 if [%contentR12%] == [%contentR11%] (goto PPR11) :RRP11 :::::::::::::::::::::::2::::::::::::: if [%contentR24%] == [%contentR23%] (goto PPR23) :RRP23 if [%contentR23%] == [%contentR22%] (goto PPR22) :RRP22 if [%contentR22%] == [%contentR21%] (goto PPR21) :RRP21 :::::::::::::::::::::::3::::::::::::: if [%contentR34%] == [%contentR33%] (goto PPR33) :RRP33 if [%contentR33%] == [%contentR32%] (goto PPR32) :RRP32 if [%contentR32%] == [%contentR31%] (goto PPR31) :RRP31 :::::::::::::::::::::::4:::::::::::::::::: if [%contentR44%] == [%contentR43%] (goto PPR43) :RRP43 if [%contentR43%] == [%contentR42%] (goto PPR42) :RRP42 if [%contentR42%] == [%contentR41%] (goto PPR41) :RRP41 ::::::::::::::::::::0::::::::::::::::::::::: set rrnn=1 :MPPNN if [%contentR14%] == [0] (goto MPPN13) :MRRN13 if [%contentR13%] == [0] (goto MPPN12) :MRRN12 if [%contentR12%] == [0] (goto MPPN11) :MRRN11 if [%contentR24%] == [0] (goto MPPN23) :MRRN23 if [%contentR23%] == [0] (goto MPPN22) :MRRN22 if [%contentR22%] == [0] (goto MPPN21) :MRRN21 if [%contentR34%] == [0] (goto MPPN33) :MRRN33 if [%contentR33%] == [0] (goto MPPN32) :MRRN32 if [%contentR32%] == [0] (goto MPPN31) :MRRN31 if [%contentR44%] == [0] (goto MPPN43) :MRRN43 if [%contentR43%] == [0] (goto MPPN42) :MRRN42 if [%contentR42%] == [0] (goto MPPN41) :MRRN41 set /a "rrnn+=1" if [%rrnn%] LEQ [3] (goto MPPNN) exit /B :PPR13 set /a "PP=%contentR14%+%contentR13%" if [%PP%] == [0] (goto RRP13) set contentR14=%PP% set content14=%PP% IF %PP% LSS 1000 set content14=_%PP% IF %PP% LSS 100 set content14=__%PP% IF %PP% LSS 10 set content14=___%PP% set content13=____ set contentR13=0 goto RRP13 :PPR23 set /a "PP=%contentR24%+%contentR23%" if [%PP%] == [0] (goto RRP23) set contentR24=%PP% set content24=%PP% IF %PP% LSS 1000 set content24=_%PP% IF %PP% LSS 100 set content24=__%PP% IF %PP% LSS 10 set content24=___%PP% set content23=____ set contentR23=0 goto RRP23 :PPR33 set /a "PP=%contentR34%+%contentR33%" if [%PP%] == [0] (goto RRP33) set contentR34=%PP% set content34=%PP% IF %PP% LSS 1000 set content34=_%PP% IF %PP% LSS 100 set content34=__%PP% IF %PP% LSS 10 set content34=___%PP% set content33=____ set contentR33=0 goto RRP33 :PPR43 set /a "PP=%contentR44%+%contentR43%" if [%PP%] == [0] (goto RRP43) set contentR44=%PP% set content44=%PP% IF %PP% LSS 1000 set content44=_%PP% IF %PP% LSS 100 set content44=__%PP% IF %PP% LSS 10 set content44=___%PP% set content43=____ set contentR43=0 goto RRP43 ::::::::::::::::::::::::::::::::::::::: :PPR12 set /a "PP=%contentR13%+%contentR12%" if [%PP%] == [0] (goto RRP12) set contentR13=%PP% set content13=%PP% IF %PP% LSS 1000 set content13=_%PP% IF %PP% LSS 100 set content13=__%PP% IF %PP% LSS 10 set content13=___%PP% set content12=____ set contentR12=0 goto RRP12 :PPR22 set /a "PP=%contentR23%+%contentR22%" if [%PP%] == [0] (goto RRP22) set contentR23=%PP% set content23=%PP% IF %PP% LSS 1000 set content23=_%PP% IF %PP% LSS 100 set content23=__%PP% IF %PP% LSS 10 set content23=___%PP% set content22=____ set contentR22=0 goto RRP22 :PPR32 set /a "PP=%contentR33%+%contentR32%" if [%PP%] == [0] (goto RRP32) set contentR33=%PP% set content33=%PP% IF %PP% LSS 1000 set content33=_%PP% IF %PP% LSS 100 set content33=__%PP% IF %PP% LSS 10 set content33=___%PP% set content32=____ set contentR32=0 goto RRP32 :PPR42 set /a "PP=%contentR43%+%contentR42%" if [%PP%] == [0] (goto RRP42) set contentR43=%PP% set content43=%PP% IF %PP% LSS 1000 set content43=_%PP% IF %PP% LSS 100 set content43=__%PP% IF %PP% LSS 10 set content43=___%PP% set content42=____ set contentR42=0 goto RRP42 :PPR11 set /a "PP=%contentR12%+%contentR11%" if [%PP%] == [0] (goto RRP11) set contentR12=%PP% set content12=%PP% IF %PP% LSS 1000 set content12=_%PP% IF %PP% LSS 100 set content12=__%PP% IF %PP% LSS 10 set content12=___%PP% set content11=____ set contentR11=0 goto RRP11 :PPR21 set /a "PP=%contentR22%+%contentR21%" if [%PP%] == [0] (goto RRP21) set contentR22=%PP% set content22=%PP% IF %PP% LSS 1000 set content22=_%PP% IF %PP% LSS 100 set content22=__%PP% IF %PP% LSS 10 set content22=___%PP% set content21=____ set contentR21=0 goto RRP21 :PPR31 set /a "PP=%contentR32%+%contentR31%" if [%PP%] == [0] (goto RRP31) set contentR32=%PP% set content32=%PP% IF %PP% LSS 1000 set content32=_%PP% IF %PP% LSS 100 set content32=__%PP% IF %PP% LSS 10 set content32=___%PP% set content31=____ set contentR31=0 goto RRP31 :PPR41 set /a "PP=%contentR42%+%contentR41%" if [%PP%] == [0] (goto RRP41) set contentR42=%PP% set content42=%PP% IF %PP% LSS 1000 set content42=_%PP% IF %PP% LSS 100 set content42=__%PP% IF %PP% LSS 10 set content42=___%PP% set content41=____ set contentR41=0 goto RRP41 ::::::::::::::0::::::::::::::::::: :PPN13 set content14=%content13% set contentR14=%contentR13% set content13=____ set contentR13=0 goto RRN13 :PPN23 set content24=%content23% set contentR24=%contentR23% set content23=____ set contentR23=0 goto RRN23 :PPN33 set content34=%content33% set contentR34=%contentR33% set content33=____ set contentR33=0 goto RRN33 :PPN43 set content44=%content43% set contentR44=%contentR43% set content43=____ set contentR43=0 goto RRN43 :PPN12 set content13=%content12% set contentR13=%contentR12% set content12=____ set contentR12=0 goto RRN12 :PPN22 set content23=%content22% set contentR23=%contentR22% set content22=____ set contentR22=0 goto RRN22 :PPN32 set content33=%content32% set contentR33=%contentR32% set content32=____ set contentR32=0 goto RRN32 :PPN42 set content43=%content42% set contentR43=%contentR42% set content42=____ set contentR42=0 goto RRN42 :PPN11 set content12=%content11% set contentR12=%contentR11% set content11=____ set contentR11=0 goto RRN11 :PPN21 set content22=%content21% set contentR22=%contentR21% set content21=____ set contentR21=0 goto RRN21 :PPN31 set content32=%content31% set contentR32=%contentR31% set content31=____ set contentR31=0 goto RRN31 :PPN41 set content42=%content41% set contentR42=%contentR41% set content41=____ set contentR41=0 goto RRN41 ::::::::::::::::::::::::::::::::::::::: :MPPN13 set content14=%content13% set contentR14=%contentR13% set content13=____ set contentR13=0 goto MRRN13 :MPPN23 set content24=%content23% set contentR24=%contentR23% set content23=____ set contentR23=0 goto MRRN23 :MPPN33 set content34=%content33% set contentR34=%contentR33% set content33=____ set contentR33=0 goto MRRN33 :MPPN43 set content44=%content43% set contentR44=%contentR43% set content43=____ set contentR43=0 goto MRRN43 :MPPN12 set content13=%content12% set contentR13=%contentR12% set content12=____ set contentR12=0 goto MRRN12 :MPPN22 set content23=%content22% set contentR23=%contentR22% set content22=____ set contentR22=0 goto MRRN22 :MPPN32 set content33=%content32% set contentR33=%contentR32% set content32=____ set contentR32=0 goto MRRN32 :MPPN42 set content43=%content42% set contentR43=%contentR42% set content42=____ set contentR42=0 goto MRRN42 :MPPN11 set content12=%content11% set contentR12=%contentR11% set content11=____ set contentR11=0 goto MRRN11 :MPPN21 set content22=%content21% set contentR22=%contentR21% set content21=____ set contentR21=0 goto MRRN21 :MPPN31 set content32=%content31% set contentR32=%contentR31% set content31=____ set contentR31=0 goto MRRN31 :MPPN41 set content42=%content41% set contentR42=%contentR41% set content41=____ set contentR41=0 goto MRRN41
:S3 ::::::::::::::::::::0::::::::::::::::::::::: set rrnn=1 :PPNN if [%contentR41%] == [0] (goto PPN31) :RRN31 if [%contentR31%] == [0] (goto PPN21) :RRN21 if [%contentR21%] == [0] (goto PPN11) :RRN11 if [%contentR42%] == [0] (goto PPN32) :RRN32 if [%contentR32%] == [0] (goto PPN22) :RRN22 if [%contentR22%] == [0] (goto PPN12) :RRN12 if [%contentR43%] == [0] (goto PPN33) :RRN33 if [%contentR33%] == [0] (goto PPN23) :RRN23 if [%contentR23%] == [0] (goto PPN13) :RRN13 if [%contentR44%] == [0] (goto PPN34) :RRN34 if [%contentR34%] == [0] (goto PPN24) :RRN24 if [%contentR24%] == [0] (goto PPN14) :RRN14 set /a "rrnn+=1" if [%rrnn%] LEQ [3] (goto PPNN) :::::::::::::::::::::::1:::::::::: if [%contentR41%] == [%contentR31%] (goto PPR31) :RRP31 if [%contentR31%] == [%contentR21%] (goto PPR21) :RRP21 if [%contentR21%] == [%contentR11%] (goto PPR11) :RRP11 :::::::::::::::::::::::2::::::::::::: if [%contentR42%] == [%contentR32%] (goto PPR32) :RRP32 if [%contentR32%] == [%contentR22%] (goto PPR22) :RRP22 if [%contentR22%] == [%contentR12%] (goto PPR12) :RRP12 :::::::::::::::::::::::3::::::::::::: if [%contentR43%] == [%contentR33%] (goto PPR33) :RRP33 if [%contentR33%] == [%contentR23%] (goto PPR23) :RRP23 if [%contentR23%] == [%contentR13%] (goto PPR13) :RRP13 :::::::::::::::::::::::4:::::::::::::::::: if [%contentR44%] == [%contentR34%] (goto PPR34) :RRP34 if [%contentR34%] == [%contentR24%] (goto PPR24) :RRP24 if [%contentR24%] == [%contentR14%] (goto PPR14) :RRP14 ::::::::::::::::::::0::::::::::::::::::::::: set rrnn=1 :MPPNN if [%contentR41%] == [0] (goto MPPN31) :MRRN31 if [%contentR31%] == [0] (goto MPPN21) :MRRN21 if [%contentR21%] == [0] (goto MPPN11) :MRRN11 if [%contentR42%] == [0] (goto MPPN32) :MRRN32 if [%contentR32%] == [0] (goto MPPN22) :MRRN22 if [%contentR22%] == [0] (goto MPPN12) :MRRN12 if [%contentR43%] == [0] (goto MPPN33) :MRRN33 if [%contentR33%] == [0] (goto MPPN23) :MRRN23 if [%contentR23%] == [0] (goto MPPN13) :MRRN13 if [%contentR44%] == [0] (goto MPPN34) :MRRN34 if [%contentR34%] == [0] (goto MPPN24) :MRRN24 if [%contentR24%] == [0] (goto MPPN14) :MRRN14 set /a "rrnn+=1" if [%rrnn%] LEQ [3] (goto MPPNN) exit /B :PPR31 set /a "PP=%contentR41%+%contentR31%" if [%PP%] == [0] (goto RRP31) set contentR41=%PP% set content41=%PP% IF %PP% LSS 1000 set content41=_%PP% IF %PP% LSS 100 set content41=__%PP% IF %PP% LSS 10 set content41=___%PP% set content31=____ set contentR31=0 goto RRP31 :PPR32 set /a "PP=%contentR42%+%contentR32%" if [%PP%] == [0] (goto RRP32) set contentR42=%PP% set content42=%PP% IF %PP% LSS 1000 set content42=_%PP% IF %PP% LSS 100 set content42=__%PP% IF %PP% LSS 10 set content42=___%PP% set content32=____ set contentR32=0 goto RRP32 :PPR33 set /a "PP=%contentR43%+%contentR33%" if [%PP%] == [0] (goto RRP33) set contentR43=%PP% set content43=%PP% IF %PP% LSS 1000 set content43=_%PP% IF %PP% LSS 100 set content43=__%PP% IF %PP% LSS 10 set content43=___%PP% set content33=____ set contentR33=0 goto RRP33 :PPR34 set /a "PP=%contentR44%+%contentR34%" if [%PP%] == [0] (goto RRP34) set contentR44=%PP% set content44=%PP% IF %PP% LSS 1000 set content44=_%PP% IF %PP% LSS 100 set content44=__%PP% IF %PP% LSS 10 set content44=___%PP% set content34=____ set contentR34=0 goto RRP34 :PPR21 set /a "PP=%contentR31%+%contentR21%" if [%PP%] == [0] (goto RRP21) set contentR31=%PP% set content31=%PP% IF %PP% LSS 1000 set content31=_%PP% IF %PP% LSS 100 set content31=__%PP% IF %PP% LSS 10 set content31=___%PP% set content21=____ set contentR21=0 goto RRP21 :PPR22 set /a "PP=%contentR32%+%contentR22%" if [%PP%] == [0] (goto RRP22) set contentR32=%PP% set content32=%PP% IF %PP% LSS 1000 set content32=_%PP% IF %PP% LSS 100 set content32=__%PP% IF %PP% LSS 10 set content32=___%PP% set content22=____ set contentR22=0 goto RRP22 :PPR23 set /a "PP=%contentR33%+%contentR23%" if [%PP%] == [0] (goto RRP23) set contentR33=%PP% set content33=%PP% IF %PP% LSS 1000 set content33=_%PP% IF %PP% LSS 100 set content33=__%PP% IF %PP% LSS 10 set content33=___%PP% set content23=____ set contentR23=0 goto RRP23 :PPR24 set /a "PP=%contentR34%+%contentR24%" if [%PP%] == [0] (goto RRP24) set contentR34=%PP% set content34=%PP% IF %PP% LSS 1000 set content34=_%PP% IF %PP% LSS 100 set content34=__%PP% IF %PP% LSS 10 set content34=___%PP% set content24=____ set contentR24=0 goto RRP24 :PPR11 set /a "PP=%contentR21%+%contentR11%" if [%PP%] == [0] (goto RRP11) set contentR21=%PP% set content21=%PP% IF %PP% LSS 1000 set content21=_%PP% IF %PP% LSS 100 set content21=__%PP% IF %PP% LSS 10 set content21=___%PP% set content11=____ set contentR11=0 goto RRP11 :PPR12 set /a "PP=%contentR22%+%contentR12%" if [%PP%] == [0] (goto RRP12) set contentR22=%PP% set content22=%PP% IF %PP% LSS 1000 set content22=_%PP% IF %PP% LSS 100 set content22=__%PP% IF %PP% LSS 10 set content22=___%PP% set content12=____ set contentR12=0 goto RRP12 :PPR13 set /a "PP=%contentR23%+%contentR13%" if [%PP%] == [0] (goto RRP13) set contentR23=%PP% set content23=%PP% IF %PP% LSS 1000 set content23=_%PP% IF %PP% LSS 100 set content23=__%PP% IF %PP% LSS 10 set content23=___%PP% set content13=____ set contentR13=0 goto RRP13 :PPR14 set /a "PP=%contentR24%+%contentR14%" if [%PP%] == [0] (goto RRP14) set contentR24=%PP% set content24=%PP% IF %PP% LSS 1000 set content24=_%PP% IF %PP% LSS 100 set content24=__%PP% IF %PP% LSS 10 set content24=___%PP% set content14=____ set contentR14=0 goto RRP14 ::::::::::::::0::::::::::::::::::: :PPN31 set content41=%content31% set contentR41=%contentR31% set content31=____ set contentR31=0 goto RRN31 :PPN32 set content42=%content32% set contentR42=%contentR32% set content32=____ set contentR32=0 goto RRN32 :PPN33 set content43=%content33% set contentR43=%contentR33% set content33=____ set contentR33=0 goto RRN33 :PPN34 set content44=%content34% set contentR44=%contentR34% set content34=____ set contentR34=0 goto RRN34 :PPN21 set content31=%content21% set contentR31=%contentR21% set content21=____ set contentR21=0 goto RRN21 :PPN22 set content32=%content22% set contentR32=%contentR22% set content22=____ set contentR22=0 goto RRN22 :PPN23 set content33=%content23% set contentR33=%contentR23% set content23=____ set contentR23=0 goto RRN23 :PPN24 set content34=%content24% set contentR34=%contentR24% set content24=____ set contentR24=0 goto RRN24 :PPN11 set content21=%content11% set contentR21=%contentR11% set content11=____ set contentR11=0 goto RRN11 :PPN12 set content22=%content12% set contentR22=%contentR12% set content12=____ set contentR12=0 goto RRN12 :PPN13 set content23=%content13% set contentR23=%contentR13% set content13=____ set contentR13=0 goto RRN13 :PPN14 set content24=%content14% set contentR24=%contentR14% set content14=____ set contentR14=0 goto RRN14 ::::::::::::::::::::::::::::::::::::::: :MPPN31 set content41=%content31% set contentR41=%contentR31% set content31=____ set contentR31=0 goto MRRN31 :MPPN32 set content42=%content32% set contentR42=%contentR32% set content32=____ set contentR32=0 goto MRRN32 :MPPN33 set content43=%content33% set contentR43=%contentR33% set content33=____ set contentR33=0 goto MRRN33 :MPPN34 set content44=%content34% set contentR44=%contentR34% set content34=____ set contentR34=0 goto MRRN34 :MPPN21 set content31=%content21% set contentR31=%contentR21% set content21=____ set contentR21=0 goto MRRN21 :MPPN22 set content32=%content22% set contentR32=%contentR22% set content22=____ set contentR22=0 goto MRRN22 :MPPN23 set content33=%content23% set contentR33=%contentR23% set content23=____ set contentR23=0 goto MRRN23 :MPPN24 set content34=%content24% set contentR34=%contentR24% set content24=____ set contentR24=0 goto MRRN24 :MPPN11 set content21=%content11% set contentR21=%contentR11% set content11=____ set contentR11=0 goto MRRN11 :MPPN12 set content22=%content12% set contentR22=%contentR12% set content12=____ set contentR12=0 goto MRRN12 :MPPN13 set content23=%content13% set contentR23=%contentR13% set content13=____ set contentR13=0 goto MRRN13 :MPPN14 set content24=%content14% set contentR24=%contentR14% set content14=____ set contentR14=0 goto MRRN14
:W1 ::::::::::::::::::::0::::::::::::::::::::::: set rrnn=1 :PPNN if [%contentR11%] == [0] (goto PPN21) :RRN21 if [%contentR21%] == [0] (goto PPN31) :RRN31 if [%contentR31%] == [0] (goto PPN41) :RRN41 if [%contentR12%] == [0] (goto PPN22) :RRN22 if [%contentR22%] == [0] (goto PPN32) :RRN32 if [%contentR32%] == [0] (goto PPN42) :RRN42 if [%contentR13%] == [0] (goto PPN23) :RRN23 if [%contentR23%] == [0] (goto PPN33) :RRN33 if [%contentR33%] == [0] (goto PPN43) :RRN43 if [%contentR14%] == [0] (goto PPN24) :RRN24 if [%contentR24%] == [0] (goto PPN34) :RRN34 if [%contentR34%] == [0] (goto PPN44) :RRN44 set /a "rrnn+=1" if [%rrnn%] LEQ [3] (goto PPNN) :::::::::::::::::::::::1:::::::::: if [%contentR11%] == [%contentR21%] (goto PPR21) :RRP21 if [%contentR21%] == [%contentR31%] (goto PPR31) :RRP31 if [%contentR31%] == [%contentR41%] (goto PPR41) :RRP41 :::::::::::::::::::::::2::::::::::::: if [%contentR12%] == [%contentR22%] (goto PPR22) :RRP22 if [%contentR22%] == [%contentR32%] (goto PPR32) :RRP32 if [%contentR32%] == [%contentR42%] (goto PPR42) :RRP42 :::::::::::::::::::::::3::::::::::::: if [%contentR13%] == [%contentR23%] (goto PPR23) :RRP23 if [%contentR23%] == [%contentR33%] (goto PPR33) :RRP33 if [%contentR33%] == [%contentR43%] (goto PPR43) :RRP43 :::::::::::::::::::::::4:::::::::::::::::: if [%contentR14%] == [%contentR24%] (goto PPR24) :RRP24 if [%contentR24%] == [%contentR34%] (goto PPR34) :RRP34 if [%contentR34%] == [%contentR44%] (goto PPR44) :RRP44 ::::::::::::::::::::0::::::::::::::::::::::: set rrnn=1 :MPPNN if [%contentR11%] == [0] (goto MPPN21) :MRRN21 if [%contentR21%] == [0] (goto MPPN31) :MRRN31 if [%contentR31%] == [0] (goto MPPN41) :MRRN41 if [%contentR12%] == [0] (goto MPPN22) :MRRN22 if [%contentR22%] == [0] (goto MPPN32) :MRRN32 if [%contentR32%] == [0] (goto MPPN42) :MRRN42 if [%contentR13%] == [0] (goto MPPN23) :MRRN23 if [%contentR23%] == [0] (goto MPPN33) :MRRN33 if [%contentR33%] == [0] (goto MPPN43) :MRRN43 if [%contentR14%] == [0] (goto MPPN24) :MRRN24 if [%contentR24%] == [0] (goto MPPN34) :MRRN34 if [%contentR34%] == [0] (goto MPPN44) :MRRN44 set /a "rrnn+=1" if [%rrnn%] LEQ [3] (goto MPPNN) exit /B :PPR21 set /a "PP=%contentR11%+%contentR21%" if [%PP%] == [0] (goto RRP21) set contentR11=%PP% set content11=%PP% IF %PP% LSS 1000 set content11=_%PP% IF %PP% LSS 100 set content11=__%PP% IF %PP% LSS 10 set content11=___%PP% set content21=____ set contentR21=0 goto RRP21 :PPR22 set /a "PP=%contentR12%+%contentR22%" if [%PP%] == [0] (goto RRP22) set contentR12=%PP% set content12=%PP% IF %PP% LSS 1000 set content12=_%PP% IF %PP% LSS 100 set content12=__%PP% IF %PP% LSS 10 set content12=___%PP% set content22=____ set contentR22=0 goto RRP22 :PPR23 set /a "PP=%contentR13%+%contentR23%" if [%PP%] == [0] (goto RRP23) set contentR13=%PP% set content13=%PP% IF %PP% LSS 1000 set content13=_%PP% IF %PP% LSS 100 set content13=__%PP% IF %PP% LSS 10 set content13=___%PP% set content23=____ set contentR23=0 goto RRP23 :PPR24 set /a "PP=%contentR14%+%contentR24%" if [%PP%] == [0] (goto RRP24) set contentR14=%PP% set content14=%PP% IF %PP% LSS 1000 set content14=_%PP% IF %PP% LSS 100 set content14=__%PP% IF %PP% LSS 10 set content14=___%PP% set content24=____ set contentR24=0 goto RRP24 ::::::::::::::::::::::::::::::::::::::: :PPR31 set /a "PP=%contentR21%+%contentR31%" if [%PP%] == [0] (goto RRP31) set contentR21=%PP% set content21=%PP% IF %PP% LSS 1000 set content21=_%PP% IF %PP% LSS 100 set content21=__%PP% IF %PP% LSS 10 set content21=___%PP% set content31=____ set contentR31=0 goto RRP31 :PPR32 set /a "PP=%contentR22%+%contentR32%" if [%PP%] == [0] (goto RRP32) set contentR22=%PP% set content22=%PP% IF %PP% LSS 1000 set content22=_%PP% IF %PP% LSS 100 set content22=__%PP% IF %PP% LSS 10 set content22=___%PP% set content32=____ set contentR32=0 goto RRP32 :PPR33 set /a "PP=%contentR23%+%contentR33%" if [%PP%] == [0] (goto RRP33) set contentR23=%PP% set content23=%PP% IF %PP% LSS 1000 set content23=_%PP% IF %PP% LSS 100 set content23=__%PP% IF %PP% LSS 10 set content23=___%PP% set content33=____ set contentR33=0 goto RRP33 :PPR34 set /a "PP=%contentR24%+%contentR34%" if [%PP%] == [0] (goto RRP34) set contentR24=%PP% set content24=%PP% IF %PP% LSS 1000 set content24=_%PP% IF %PP% LSS 100 set content24=__%PP% IF %PP% LSS 10 set content24=___%PP% set content34=____ set contentR34=0 goto RRP34 :PPR41 set /a "PP=%contentR31%+%contentR41%" if [%PP%] == [0] (goto RRP41) set contentR31=%PP% set content31=%PP% IF %PP% LSS 1000 set content31=_%PP% IF %PP% LSS 100 set content31=__%PP% IF %PP% LSS 10 set content31=___%PP% set content41=____ set contentR41=0 goto RRP41 :PPR42 set /a "PP=%contentR32%+%contentR42%" if [%PP%] == [0] (goto RRP42) set contentR32=%PP% set content32=%PP% IF %PP% LSS 1000 set content32=_%PP% IF %PP% LSS 100 set content32=__%PP% IF %PP% LSS 10 set content32=___%PP% set content42=____ set contentR42=0 goto RRP42 :PPR43 set /a "PP=%contentR33%+%contentR43%" if [%PP%] == [0] (goto RRP43) set contentR33=%PP% set content33=%PP% IF %PP% LSS 1000 set content33=_%PP% IF %PP% LSS 100 set content33=__%PP% IF %PP% LSS 10 set content33=___%PP% set content43=____ set contentR43=0 goto RRP43 :PPR44 set /a "PP=%contentR34%+%contentR44%" if [%PP%] == [0] (goto RRP44) set contentR34=%PP% set content34=%PP% IF %PP% LSS 1000 set content34=_%PP% IF %PP% LSS 100 set content34=__%PP% IF %PP% LSS 10 set content34=___%PP% set content44=____ set contentR44=0 goto RRP44 ::::::::::::::0::::::::::::::::::: :PPN21 set content11=%content21% set contentR11=%contentR21% set content21=____ set contentR21=0 goto RRN21 :PPN22 set content12=%content22% set contentR12=%contentR22% set content22=____ set contentR22=0 goto RRN22 :PPN23 set content13=%content23% set contentR13=%contentR23% set content23=____ set contentR23=0 goto RRN23 :PPN24 set content14=%content24% set contentR14=%contentR24% set content24=____ set contentR24=0 goto RRN24 :PPN31 set content21=%content31% set contentR21=%contentR31% set content31=____ set contentR31=0 goto RRN31 :PPN32 set content22=%content32% set contentR22=%contentR32% set content32=____ set contentR32=0 goto RRN32 :PPN33 set content23=%content33% set contentR23=%contentR33% set content33=____ set contentR33=0 goto RRN33 :PPN34 set content24=%content34% set contentR24=%contentR34% set content34=____ set contentR34=0 goto RRN34 :PPN41 set content31=%content41% set contentR31=%contentR41% set content41=____ set contentR41=0 goto RRN41 :PPN42 set content32=%content42% set contentR32=%contentR42% set content42=____ set contentR42=0 goto RRN42 :PPN43 set content33=%content43% set contentR33=%contentR43% set content43=____ set contentR43=0 goto RRN43 :PPN44 set content34=%content44% set contentR34=%contentR44% set content44=____ set contentR44=0 goto RRN44 ::::::::::::::::::::::::::::::::::::::: :MPPN21 set content11=%content21% set contentR11=%contentR21% set content21=____ set contentR21=0 goto MRRN21 :MPPN22 set content12=%content22% set contentR12=%contentR22% set content22=____ set contentR22=0 goto MRRN22 :MPPN23 set content13=%content23% set contentR13=%contentR23% set content23=____ set contentR23=0 goto MRRN23 :MPPN24 set content14=%content24% set contentR14=%contentR24% set content24=____ set contentR24=0 goto MRRN24 :MPPN31 set content21=%content31% set contentR21=%contentR31% set content31=____ set contentR31=0 goto MRRN31 :MPPN32 set content22=%content32% set contentR22=%contentR32% set content32=____ set contentR32=0 goto MRRN32 :MPPN33 set content23=%content33% set contentR23=%contentR33% set content33=____ set contentR33=0 goto MRRN33 :MPPN34 set content24=%content34% set contentR24=%contentR34% set content34=____ set contentR34=0 goto MRRN34 :MPPN41 set content31=%content41% set contentR31=%contentR41% set content41=____ set contentR41=0 goto MRRN41 :MPPN42 set content32=%content42% set contentR32=%contentR42% set content42=____ set contentR42=0 goto MRRN42 :MPPN43 set content33=%content43% set contentR33=%contentR43% set content43=____ set contentR43=0 goto MRRN43 :MPPN44 set content34=%content44% set contentR34=%contentR44% set content44=____ set contentR44=0 goto MRRN44
ссылка на оригинал статьи http://geektimes.ru/post/249692/
Добавить комментарий