View Single Post
  #27  
Old 02-10-2006, 12:23 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Collaboration lacking abstraction of a problem is a very very bad idea in scripting. You can't just be random. I'd suggest starting with what you want to make. Ex. Chess
Then you work as a group to determine what functions and objects you will make (in our case an object will always be an npc).

What would you want for a chess script?
Board NPC with
board_x[] array for setting the xs where the pieces go
board_y[] array

Pawn NPCs
Knight NPCs
Bishop NPCs
Rook NPCs
Queen NPCs
King NPCs
Self-Check test/move unsetter
Stalemate test
Checkmate test
movement controller

Each piece will have a team var.
They will need to check to see if their move is valid
I can tell you by experience, that for the pieces, pawns will be the hardest and knights will be the easiest. You would want to start with specifying the chessboard class though, since it's relevant to all other classes and functionality.

Last edited by jake13jake; 02-10-2006 at 12:46 AM..
Reply With Quote