Computer Science Canada

Connect Four game... need help with arrays

Author:  princess [ Mon Jun 02, 2003 9:21 pm ]
Post subject:  Connect Four game... need help with arrays

ok... i set table made of an array 8 by 6 how do i draw the little circles for the coin pieces in the game? the screen is 800x600. how do i noe where to put the centre of the circle and where the edges of the block are?

Author:  Tony [ Mon Jun 02, 2003 9:47 pm ]
Post subject: 

well pick a size for your circle... say 100 pixels. This means that each center is located at arrayLocation * 100

and your radius would be 50, so that circles just touch each other.

Author:  PaddyLong [ Tue Jun 03, 2003 7:17 pm ]
Post subject: 

I maded a kick ass connect 4 game last year Very Happy with like ai and stuff Razz

Author:  princess [ Tue Jun 03, 2003 8:53 pm ]
Post subject: 

ok... tony it doesn't work...well it doesn't work properly...see the whole table of circles are shifted and there is an empty row and column along the bottom

and...

PaddyLong can i see ur program.. like play it

Author:  Tony [ Tue Jun 03, 2003 9:13 pm ]
Post subject: 

well if whole field is shifted, why not just move all the pieces back in opposite direction to match original position?

arrayLocation * 100 +100

that would shift everything to the right by 100 pixels

Author:  princess [ Tue Jun 03, 2003 10:10 pm ]
Post subject: 

thanx again...

Author:  PaddyLong [ Wed Jun 04, 2003 3:10 pm ]
Post subject: 

sure... here's my connect 4 ... no fancy graphics or anything, just basic circles and such

Author:  Homer_simpson [ Wed Jun 04, 2003 3:38 pm ]
Post subject: 

nice work... +10 bits

Author:  princess [ Thu Jun 05, 2003 4:45 pm ]
Post subject: 

Surprised WOW that looks amazing! thank u soo much... it looks soo good... mine is sooo fugly

Author:  Tony [ Thu Jun 05, 2003 5:17 pm ]
Post subject: 

sweet... your AI beat me Shocked +25Bits Impressive... maybe you could add some sounds in future?

Author:  PaddyLong [ Thu Jun 05, 2003 6:05 pm ]
Post subject: 

hehe, try entering 0 players to see the computer play itself


: