i am having trouble with moving graphics on the screen with my commands and the AI response ot my commands here is
an example without using graphics instead a 0
Code: Select all
attackrow = 12
attackcolumn = 40
row = 12
column = 10
DO
DO
keyed$ = INKEY$
LOOP UNTIL keyed$ <LOCATE> 1) THEN
row = row - 1
end if
IF (keyed$ = CHR$(0) + CHR$(80)) AND (row <23> 1) THEN
column = column - 1
end if
IF (keyed$ = CHR$(0) + CHR$(77)) AND (column < 80) THEN
column = column + 1
end if
IF keyed$ = "e" THEN END
LOCATE row, column
COLOR 10
PRINT "0"
'AI
LOCATE attackrow, attackcolumn
PRINT " "
IF row <attackrow> attackrow THEN
attackrow = attackrow + 1
end if
IF column <attackcolumn> attackcolumn THEN
attackcolumn = attackcolumn + 1
end if
LOCATE attackrow, attackcolumn
COLOR 5
PRINT "0"
LOOP
And using that code above but modified i want to move this graphic for player 1
cls
screen 7
xlength = 6
ylength = 6
FOR x = 1 TO xlength
FOR Y = 1 TO ylength
READ z
PSET (x, Y), z
DATA 04,04,04,04,04,04
DATA 04,04,04,04,04,04
DATA 04,04,04,04,04,04
DATA 04,04,04,04,04,04
DATA 04,04,04,04,04,04
DATA 04,04,04,04,04,04
NEXT
NEXT
and this one for the AI
cls
screen 7
xlength = 8
ylength = 8
FOR x = 1 to xlength - 1
FOR y = 1 to ylength - 1
READ z
PSET (x, y), z
DATA 00, 00, 00, 14, 14, 00, 00, 00
DATA 00, 00, 00, 14, 14, 00, 00, 00
DATA 00, 00, 00, 14, 14, 00, 00, 00
DATA 14, 14, 14, 14, 14, 14, 14, 14
DATA 14, 14, 14, 14, 14, 14, 14, 14
DATA 00, 00, 00, 14, 14, 00, 00, 00
DATA 00, 00, 00, 14, 14, 00, 00, 00
DATA 00, 00, 00, 14, 14, 00, 00, 00
NEXT
NEXT
(line(x1,y1)-(x2,y2), color)
could someone please help me i need it very bad