(svn r10564) [NoAI] -Add: added a AITileList valuator that checks for a NxM buildable spot with the entry from the AITileList as top-left tile
/* $Id$ */
/** @file ai_company.hpp Everything to query a company's financials and statistics */
#ifndef AI_COMPANY_HPP
#define AI_COMPANY_HPP
#include "ai_object.hpp"
/**
* Class that handles all company related functions.
*/
class AICompany : public AIObject {
public:
/**
* The name of the class, needed by several sub-processes.
*/
static const char *GetClassName() { return "AICompany"; }
/**
* Set the name of your company.
* @param name the new name of the company.
* @pre name != NULL
* @return true if the name was changed.
*/
bool SetCompanyName(const char *name);
/**
* Get the name of your company.
* @return the name of your company.
* @note the returned company name must be free'd (C++ only).
*/
char *GetCompanyName();
/**
* Set the name of your president.
* @param name the new name of the president.
* @pre name != NULL
* @return true if the name was changed.
*/
bool SetPresidentName(const char *name);
/**
* Get the name of your president.
* @return the name of your president.
* @note the returned president name must be free'd (C++ only).
*/
char *GetPresidentName();
/**
* Gets the current value of your company.
* @return the current value of your company.
*/
int32 GetCompanyValue();
/**
* Gets the bank balance. In other words, the amount of money you can spent.
* @return the bank balance of your company.
*/
int32 GetBankBalance();
/**
* Gets the amount your company have loaned.
* @return the amount loaned money.
* @post the return value is always non-negative.
* @post GetLoanInterval() is always a multiplier of the return value.
*/
int32 GetLoanAmount();
/**
* Gets the maximum amount your company can loan.
* @return the maximum amount your company can loan.
* @post the return value is always non-negative.
* @post GetLoanInterval() is always a multiplier of the return value.
*/
int32 GetMaxLoanAmount();
/**
* Gets the interval/loan step.
* @return the loan step.
* @post return value is always positive.
*/
int32 GetLoanInterval();
/**
* Sets the amount to loan.
* @param loan the amount to loan (multiplier of GetLoanInterval()).
* @pre loan must be non-negative.
* @pre GetLoanInterval must be a multiplier of loan.
* @pre loan must be below GetMaxLoan().
* @pre loan - GetLoanAmount() + GetBankBalance() must be non-negative.
* @return true if the loan could be set to your requested amount.
*/
bool SetLoanAmount(int32 loan);
};
#endif /* AI_COMPANY_HPP */