Results 1 to 2 of 2

Thread: connect 4 help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    67

    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

  2. #2
    Member
    Join Date
    Oct 2002
    Posts
    41

    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
  •  



Click Here to Expand Forum to Full Width