|Okey, So i am making a batch game. |
its called boxes. its a game where you vs another player.
its placed on an even grid 9x9 and each move is drawn from one dot to another (up down left right) once a box is formed, thats your point.
now heres is the idea .. kinda
iv set each grid %var% into its true form (EG: set #22=STR)
so once a move is made on the grid, buy typing grid location (EG: 54) which will be reconised as #54 and allowing to locate the grid. set as %move%
now, setting the vars
i set a direction, indicated by, 1=up 2=down 3=left and so on..
now the direction variable gets set as:
SET /p fnd=1
if "%fnd%" == "1" set D= I
if "%fnd%" == "2" set /a dwn=%move% +10 (it places it on the next line of the grid)
if "%fnd%" == "3" etc...
Anyway The Problem Is This Peice:
i need to set the direction as the move.. the move starts off as " ."
then up replaces it to " I"
but it cannot be repeated.
grid number = 54 is known as a variable.. which is #54 = . (grid dot)
move = #54
direction = I
problem = if "%%MOVE%%" == " ." set %move%= I>>temp.bat
i did find a shortcut way, but it didnt support the games logic into changing charaters
the problem basically is:
how can i combine a set variable "1" into becoming the variable
so %var1% = 54, i need "%" signs around the 54 of var1 without it joining the two signs..
set move=#%move% (adds the # to 54)
if "%%move%%" == "A" set %move%=B
so hard to explain