Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Yet More CMA
Home

[Freeciv-Dev] Yet More CMA

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Yet More CMA
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Mon, 24 Sep 2001 05:34:57 -0700 (PDT)

This function is pointless. Why not just use player_in_city_radius?
     
     static int is_in_the_patch_of_a_city(int x,int y)
     {
         return player_in_city_radius(game.player_ptr,x,y);
}


The following code blocks pops up frequently in the CMA code. 
Using some macro magic

#define CHECKTILE    if (x == 2 && y == 2)     \
                                 continue      
                                    
 
 The other two are left as an exercise for the reader.
 
 1)
 
 if (result->worker_positions_used[x][y]) {  
        worker++;       
                                    }
 
 
 
 2)
 
 if (pcity->size !=                                                             
                                                                        
             (worker + result->entertainers + result->scientists +              
                 
              result->taxmans)) {                                               
                 
           print_city(pcity);                                                   
                 
           print_cma_result(result);                                            
                 
           assert(0);                                                           
                 
 } 
       




__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.com


[Prev in Thread] Current Thread [Next in Thread]