Swift code for naughts and crosses