Author: Tom Kerrigan
Date: 05:22:00 02/22/00
Go up one level in this thread
On February 21, 2000 at 13:47:06, blass uri wrote: >I need functions for things that I do several times. >I thought to use functions for things like checking if a move is legal and >generating moves(it is not important if I use a function for generating the >initial position) but probably it is a better idea to start with defining the >main only by undefined functions and only after it to design the functions. That's one way to look at things, but most people will disagree with you. You don't want to be working with all of your program all of the time. Let's say you have your move generator lodged in your search function. And you want to change your search function. But first you have to find the right part, so you have to scroll through several hundred lines of move-generator code. Not cool. And you can't just glance at your search function and get the gist of it, because there's so much extra crud in there. Now let's say you give your program to somebody else. He will have a hell of a time figuring it out, because it's not clear where anything is. Instead of putting the move generator in a nice function called generate(), you have it built in to the function that's supposed to be searching, not generating moves... -Tom
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.