Created
December 17, 2010 05:01
-
-
Save mikeminutillo/744510 to your computer and use it in GitHub Desktop.
Simple Gr1d.org warrior to enter the Arena. The actual actions and strategies are secret sauce :p
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Tick(IAgentUpdateInfo agentUpdate) | |
{ | |
if (agentUpdate.Node.OpposingAgents.Any()) FightOrFlight(agentUpdate); | |
else SeekEnemiesAndBuffUp(agentUpdate); | |
} | |
private void FightOrFlight(IAgentInfo agentInfo) | |
{ | |
if (IsOutnumbered(agentInfo) || IsOutgunned(agentInfo)) Move(agentInfo, FleeStrategy); | |
else Fight(agentInfo); | |
} | |
private void SeekEnemiesAndBuffUp(IAgentInfo agentInfo) | |
{ | |
if (IsPinned(agentInfo) || !IsBuffed(agentInfo)) Buff(); | |
else Move(agentInfo, HuntStrategy); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment