Forgot to keep track of angles that don't fit any rule. But still not working.