All logic now in single class.
Added BFS to check move possibility.