added wonderful Side enum stuff to calculate shadows