Almost finished. Only left part is AI.getMoves().