Checking in goal check
merging bryce's working code
Added win check with legitimate moves check... about to make a bit simpler