Author |
Message |
princess
|
Posted: 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
|
|
|
Tony
|
Posted: 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.
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
PaddyLong
|
Posted: Tue Jun 03, 2003 7:17 pm Post subject: (No subject) |
|
|
I maded a kick ass connect 4 game last year with like ai and stuff
|
|
|
|
|
|
princess
|
Posted: 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
|
Posted: 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
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
princess
|
Posted: Tue Jun 03, 2003 10:10 pm Post subject: (No subject) |
|
|
thanx again...
|
|
|
|
|
|
PaddyLong
|
Posted: 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
Description: |
|
Download |
Filename: |
Connect4.zip |
Filesize: |
170.92 KB |
Downloaded: |
680 Time(s) |
|
|
|
|
|
|
Homer_simpson
|
Posted: Wed Jun 04, 2003 3:38 pm Post subject: (No subject) |
|
|
nice work... +10 bits
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
princess
|
Posted: Thu Jun 05, 2003 4:45 pm Post subject: (No subject) |
|
|
WOW that looks amazing! thank u soo much... it looks soo good... mine is sooo fugly
|
|
|
|
|
|
Tony
|
Posted: Thu Jun 05, 2003 5:17 pm Post subject: (No subject) |
|
|
sweet... your AI beat me +25Bits Impressive... maybe you could add some sounds in future?
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
PaddyLong
|
Posted: Thu Jun 05, 2003 6:05 pm Post subject: (No subject) |
|
|
hehe, try entering 0 players to see the computer play itself
|
|
|
|
|
|
|