Swipe pattern lock screen code in C