Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Connect Four game... need help with arrays
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
princess




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Jun 02, 2003 9:47 pm   Post subject: (No 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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
PaddyLong




PostPosted: Tue Jun 03, 2003 7:17 pm   Post subject: (No subject)

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




PostPosted: Tue Jun 03, 2003 8:53 pm   Post subject: (No 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
Tony




PostPosted: Tue Jun 03, 2003 9:13 pm   Post subject: (No 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
princess




PostPosted: Tue Jun 03, 2003 10:10 pm   Post subject: (No subject)

thanx again...
PaddyLong




PostPosted: Wed Jun 04, 2003 3:10 pm   Post subject: (No subject)

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


Connect4.zip
 Description:

Download
 Filename:  Connect4.zip
 Filesize:  170.92 KB
 Downloaded:  667 Time(s)

Homer_simpson




PostPosted: Wed Jun 04, 2003 3:38 pm   Post subject: (No subject)

nice work... +10 bits
Sponsor
Sponsor
Sponsor
sponsor
princess




PostPosted: Thu Jun 05, 2003 4:45 pm   Post subject: (No subject)

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




PostPosted: Thu Jun 05, 2003 5:17 pm   Post subject: (No subject)

sweet... your AI beat me Shocked +25Bits Impressive... maybe you could add some sounds in future?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
PaddyLong




PostPosted: Thu Jun 05, 2003 6:05 pm   Post subject: (No subject)

hehe, try entering 0 players to see the computer play itself
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 11 Posts ]
Jump to:   


Style:  
Search: