Simple Perimeter Ratio Test

Naive implementation of a ratio test to determine the current card.