Stap 1: De Code
Gewoon kopiëren en plak de volgende code in een Kladblok-document en sla het op als "Movement.bat", instellen als "Alle bestanden", vervolgens druk op opslaan. U kunt nu openen en spelen! Geniet van!
uitschakelen
titel beweging Test
: initsetup
set xcoord = 3
set ycoord = 3
: displaysetup
CLS
set x1y1 =
set x1y2 =
set x1y3 =
set x1y4 =
set x1y5 =
set x2y1 =
set x2y2 =
set x2y3 =
set x2y4 =
set x2y5 =
set x3y1 =
set x3y2 =
set x3y3 =
set x3y4 =
set x3y5 =
set x4y1 =
set x4y2 =
set x4y3 =
set x4y4 =
set x4y5 =
set x5y1 =
set x5y2 =
set x5y3 =
set x5y4 =
set x5y5 =
: weergeven
set x % xcoord %y % ycoord % = X
ECHO.
ECHO gebruik WASD om te gaan, of druk op P om af te sluiten.
ECHO.
ECHO ÉÍÍÍÍÍÍÍÍÍ»
ECHO º % x1y1% x2y1% x3y1% x4y1% x5y1% º
ECHO º % x1y2% x2y2% x3y2% x4y2% x5y2% º
ECHO º % x1y3% x2y3% x3y3% x4y3% x5y3% º
ECHO º % x1y4% x2y4% x3y4% x4y4% x5y4% º
ECHO º % x1y5% x2y5% x3y5% x4y5% x5y5% º
ECHO ÈÍÍÍÍÍÍÍÍͼ
choice /c swadp/n
richting instellen = % errorlevel %
goto richting richting %
: direction1
set /a ycoord = % ycoord % + 1
Als % ycoord % GTR 5 ()
set /a ycoord = % ycoord %-1
goto displaysetup
) anders ()
goto displaysetup
)
: direction2
set /a ycoord = % ycoord %-1
Als % ycoord % LSS 1 ()
set /a ycoord = % ycoord % + 1
goto displaysetup
) anders ()
goto displaysetup
)
: direction3
set /a xcoord = % xcoord %-1
Als % xcoord % LSS 1 ()
set /a xcoord = % xcoord % + 1
goto displaysetup
) anders ()
goto displaysetup
)
: direction4
set /a xcoord = % xcoord % + 1
Als % xcoord % GTR 5 ()
set /a xcoord = % xcoord %-1
goto displaysetup
) anders ()
goto displaysetup
)
: direction5
CLS
ECHO.
ECHO weet u zeker dat u wilt afsluiten?
ECHO.
ECHO (J/N)
choice /c yn /n
Als % errorlevel % == 1 uitgang
Als % errorlevel % == 2 goto initsetup