Add AI and fix animation bugs.

1. The AI is added (No difficult options for now).
2. Fix the animation bugs for the black’s move.
3. Learning E2E tests and will added later…. Added AI for fun first.
4. Since I checked the api.js and has no clue how the ai mode works, so
for now I implement in my own way.