Added check for winning condition and added WinState