Computer Science Canada Need a little help with checkers.... |
Author: | steve_k91 [ Sat Nov 27, 2004 4:42 pm ] | ||
Post subject: | Need a little help with checkers.... | ||
Hey guys, I'm doing a project for my Grade 10 compsci class and have to build checkers. ive got the board and the peices put on but i have no clue about how to move the peices... Heres what i have so far... any help you can give would b amazing.
thanks again guys |
Author: | Delos [ Sat Nov 27, 2004 5:06 pm ] |
Post subject: | |
Ok, you seem to have the right idea regarding array usage. Now you need to find out a bit about Mouse. commands: Mouse.Where() Mouse.ButtonChoose() etc etc. Then you'll want to set up a nice procedure that allows the User to click on an individual tile, check to see what's in it, if it's a piece, allow for movement (i.e., clicking on another tile). You'll want to look up types and records too, it will make using the tile concept a lot easier (basically you'll be packaging objects with varying, repeating characteristics together). Records by Dodge |
Author: | Cervantes [ Sat Nov 27, 2004 5:15 pm ] |
Post subject: | |
this thread might help, though it becomes useless once dodge starts worshipping Catalyst. |
Author: | steve_k91 [ Sat Nov 27, 2004 7:17 pm ] |
Post subject: | |
Thanks allot guys ive figured out the procedure for that allows the User to click on an individual tile, check to see what's in it and if it's a piece, allow for movement. but exactly how do i move it using the array? |
Author: | Cervantes [ Sat Nov 27, 2004 7:28 pm ] | ||
Post subject: | |||
well, if you've got the part to check if it's within movement distance:
that's one way of doing it. |
Author: | SuperGenius [ Sat Nov 27, 2004 11:09 pm ] |
Post subject: | |
you'll also have to check that they're not trying to move the checker off the edge of the board or that they are trying to move it to a square that already has a checker in it. One thing at a time though. |
Author: | wtd [ Sat Nov 27, 2004 11:27 pm ] | ||
Post subject: | |||
One thought... a square on the board can be either red or black. This could be represented by a boolean. Also, it can either be occupied or not. Another boolean.
|
Author: | steve_k91 [ Sun Nov 28, 2004 1:24 pm ] |
Post subject: | |
thanks allot guys... that really helped... ill post the final program once im done |