Now, as for this game, we don't really require any A.I. since most of our obstacles themselves are a big challenge for us. However, we can have some food for thought. Here's an exercise for you. Using your knowledge gained in previous chapters, try to create an A.I. class for an enemy spawning, which will start shooting projectiles at you if it enters a certain radius. Here are your objectives for creating an A.I.:
- Spawn enemies from right side of the screen
- Make them move in the left-hand direction
- Upon entering a certain radius, they will start shooting projectiles at you
- If you collide with the projectile, the game pauses