Almost finished stateSearch and findNextMove
Merged stuff