Kai Antweiler <[EMAIL PROTECTED]> writes: >> My idea is to use flags to control areas. Any contiguous set of >> clearing cells would be automatically governed by a clearing flag >> whose circle contained or intersected with one of the cells. > > Yes, makes sense.
>> If two or more flags would govern a set of cells, then which flag a >> cell is governed by would be determined by looking for the smaller >> of the distance to the flag minus the radius of the flag. > > Ok, this works. It's a bit unusual because both numbers are likely to > be negative, because radius is larger than distance if the flag governs > the cell. Actually, the radius can be smaller than the distance following my suggested definition above. For example, consider this set of cells, where each x marks a clearing cell, each “.” is _not a clearing cell, and X is the center of a clearing flag of radius 2: ....xx .X.xxx ....xx The circle of the clearing flag only intersects the leftmost “x”, but following the rules I suggested above, the cells governed by that clearing flag would be all of the x's. As another example, if Y is the center of a clearing flag of radius 2, all of the y's and z's are clearing cells, and each “.” is not a clearing cell, then all of the y's in the following layout are governed by the flag at Y, and none of the z's: yyyyy...yyyyy y...y...y...y y.z.y.Y.y.z.y y...y...y...y yyyyy...yyyyy Now let's consider an example with 2 clearing flags contesting the control of some contiguous clearing cells. Suppose that W marks the center of a clearing flag with radius 4 and V marks the center of a clearing flag with radius 3. Let each location marked w or v be a clearing cell and each location marked “.” _not_ be a clearing cell. Then in the following configuration the flag at W governs all of the w's and the flag at V governs all of the v's ......... .wwwwvvv. .wWwwvVv. .wwwwvvv. ......... Notice that the middle column of clearing cells (all marked w) are inside the circles of both clearing flags, but are governed by the flag at W. Consider another example. Let S mark the center of a clearing flag of radius 1 and T mark the center of a clearing flag of radius 0. Let each location marked s or t be a clearing cell and each location marked “.” _not_ be a clearing cell. Then in the following configuration the flag at S governs all of the s's and the flag at T governs all of the t's: ......... .ssssttt. .sSsstTt. .ssssttt. ......... This layout gives the same division as the previous example, but in this case the middle column of clearing cells (all marked s) are outside the circles of both clearing flags. By the way, there would need to be an arbitrary rule for deciding which flag governed a clearing cells equidistant from two (or more) clearing flags. > But that is a matter of implementation. > radius - distance gives a positive score, which should be maximized. Right. >> A minor addition: It might be useful to allow moving a war flag to >> optionally move the set of cells it governs. This could allow things >> like "lines of battle" or help to make flanking attacks. > > Do you mean that the flag will have a noncircular region that You didn't seem to complete your sentence. What was your question? >> Comments? Good idea or just stupid? > > Good idea. Thanks! -- Joe _______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
