Finally checking winning conditions.