Finished the task for horizontal, vertical and diagonal