Added win and end conditions