Implementing AI

Still missing some details