Most games will have an enemy that exhibits some basic AI (Artificial Intelligence). This chapter serves as an introduction to some basic AI.
Avoid the player
Guard an area and attack the player if they get too close
Calculate the best play in a card game
Shoot a projectile at the player
Shoot at a player if they see them
Generally, you will evaluate some code and determine if it is true or false (or some other value) and make something happen as a result.
This section will start with a basic system and ...