optimized win game condition. Console bug fixed