Have you tried using the completed demo of the game and adding c_move from there? Going from scratch may be tedious..