|
-
Apr 18th, 2005, 12:51 PM
#1
Thread Starter
Lively Member
connect 4 help
Hi all, I am trying to develop a game, a 3d version of connect 4. The game has a 4x4x4 grid, which the user enters there colored piece (red or yellow). The game encorporate gravity so the verticle columns 'fill up' as such. However I have got this part working but I am having problems in searching to see if the player has scored a line.
Any ideas how I could do this, is there a more effcient way than searching through the whole array each time a piece is placed???
Many thanks
-
Apr 19th, 2005, 04:26 AM
#2
Member
Re: connect 4 help
theres only 64 tiles.. dont worry about it IMO... but you can do it this way maybe...,
hold the coordinates of an occupied tile in an array, check following tiles, if there is an adjacent occupied tile, hold that value as well.. if not release the value.
Hope you know what im sayin kinda
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
|