Update gpv3.c

added check for winning. program exits afterwards