Add some code for chess engine and its process