|
-
Mar 1st, 2002, 08:42 AM
#1
Thread Starter
Lively Member
-
Mar 1st, 2002, 10:53 AM
#2
Frenzied Member
Huh try keeping the coordinates of the selected piece in variables (for example, SelX and SelY). Then you can check if the selected piece is 1 square up, down, to the right or to the left of the new tile 
Here's some pseudo-code:
Code:
if we're selecting a piece then
selx=selected piece x
sely=selected piece y
else
if selx-1=selected piece x and sely=selected piece y then
'Note that this only checks if it's to the left (selx-1, sely)... you'll have to test all the 4 directions to make it work :)
this move is valid so move it :)
end if
end if
Last edited by Jotaf98; Mar 1st, 2002 at 11:43 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|