Created BFS algorithm with pruning for color detection, and added more tests