----------------------------------- jamesb Thu May 29, 2003 1:05 pm Checkers! ----------------------------------- OK. This is for a grade 10 OOT assessment. I decided to create checkers, and I need a way to move the pieces effectively. Should I use the mouse and have a drag and drop style? If so, how could I implement this? Contact me if you want the program...or what I have of it so far. ----------------------------------- Homer_simpson Thu May 29, 2003 1:28 pm ----------------------------------- what's checkers?! ----------------------------------- void Thu May 29, 2003 3:03 pm ----------------------------------- i say use mouse....and if the color of the square that you land on is the "playing" color..then allow the move....if not...reject it...you also need to restrict number of squares...and you need to erase peices that are killed...and eventually u need to program the crowning and the special moves available for that ----------------------------------- Tony Thu May 29, 2003 4:51 pm ----------------------------------- Use mouth to move pieces around (you can make the piece "attach" to the mouse to show the drag) then on release, lock it to the closest square which will be a 2D array. Before moving the piece though, you need to validate the move from original spot to the one you just draged the piece to. If it's ok, change the values in the array. As for erasing, you can just redraw your background + array. Since destoryed pieces will not be contained in the array, there's nothing special here. ----------------------------------- Homer_simpson Thu May 29, 2003 4:58 pm ----------------------------------- what's checkers?! =( ----------------------------------- Tony Thu May 29, 2003 5:02 pm ----------------------------------- its a board game. Played on the same board as chess, but only 1 color is used (back I think). each player has 3 rows of units, which can only move 1 space diagnoly. If they are next to opponent's piece you can jump over it (providing there's an empty space to land), thus destorying opponent's piece (you can destroy more then one if your piece can continue jumping from the landing spot). Game is won when all opponent's pieces are destoyed. When you get to opposite end of board, you get a special unit that doesn't have distance restrictions. ----------------------------------- Andy Thu May 29, 2003 7:52 pm ----------------------------------- checkers in grade 10? wow, i know some one who is in grade 11 comp sci, he's a math genius and he's making checkers for his final, yet he is struggling with it... ----------------------------------- Catalyst Thu May 29, 2003 8:00 pm ----------------------------------- checkers isnt that complicated ----------------------------------- Andy Thu May 29, 2003 8:02 pm ----------------------------------- hey catalyst, lay off, not everyone is as smart as you, and if he's taking grade 10 compsci, that must tell u something... ----------------------------------- Asok Thu May 29, 2003 8:10 pm ----------------------------------- catalyst is in grade 10 comp sci too so watch yourself dodge. although I do agree, not everyone is as smart as catalyst such as, well everyone. *bows* ----------------------------------- void Thu May 29, 2003 8:25 pm ----------------------------------- all hail catalyst programmer of stuff ----------------------------------- Andy Thu May 29, 2003 8:45 pm ----------------------------------- our friend catalyst at home hollow be thy code your scolorship come, your dreams be done on earth as it is in ur world give us today our daily source code and forgive us who doubted your abilities just as we forgive us for doubting our abilities lead us not into bad programming but deliver us from less than 100% urs truly fellow programmer ----------------------------------- Homer_simpson Thu May 29, 2003 8:46 pm ----------------------------------- hehe good poem... ----------------------------------- Catalyst Thu May 29, 2003 8:48 pm ----------------------------------- ditto ----------------------------------- JayLo Thu May 29, 2003 8:51 pm ----------------------------------- hm... reminiscent of the Lord's Prayer. ----------------------------------- Andy Fri May 30, 2003 8:15 am ----------------------------------- yepp, dun get me wrong, i'm, not dissing Jesus or anything...