Implement tic-tac-toe rules and basic win/loss handling