Splitting into three files
Split the win condition logic into a separate function