Connect to:
http://www.9cbs.net/develop/read_article.asp?id=11111
Using the striker, avant-garde or even defending more attacks, is the best attack method, you can use the Abstract Factory mode, use an AbstractFactory to create a unified attack position, and then derive specific Concrete Factory (specific location) to produce Concrete Product (goal), all the offensive is directed by the Client Class (coach). The disadvantage is that the basic hair has been killed, there is no creative goal method, such as the shoulder goal, the chest goal and "God's hand", etc.: P code as follows: T position = Class (TOBJECT)
public
Constructor crete;
DESTRUCTOR DESTROY; OVERRIDE;
Function header (aowner: tcomponent): T header score; Virtual; Abstract;
AOWNER: TComponent: T near shot score; Virtual; Abstract;
AOWNER: TComponent: t long-range score; Virtual; Abstract;
END;
T forward = Class (T position)
public
{Concrete Constructionors}
Function front ball (AOWNER: TComponent): t forward ball score; OVERRIDE;
Function forward (AOWNER: TComponent): T striker nearby; OVERRIDE;
Function striker remote (AOWNER: TComponent): t forward score; OVERRIDE;
END;
T defender = Class (T position)
public
{Concrete Constructionors}
Function defender header (AOWNER: TComponent): T-guard header score; OVERRIDE;
Function Refielder (AOWNER: TComponent): T-guards are induced; OVERRIDE;
Function defender remote (AOWNER: TComponent): T-guard remote score; OVERRIDE;
END;