+ 3
[ASSIGNMENT] Tic Tac Toe
It's time for another challenge, this time a little easier. Write a program, that accepts three strings with three characters each (out of x, o, -) representing player marks or empty cells in a game of Tic Tac Toe. If x wins, the code should print x, if o wins it should print o and - in case of a draw. Best answer for the shortest or most elegant solution, but everyone who tries will get a like.
3 Answers
+ 3
Examples:
xxo
oox
xox
returns -
xo-
xxo
x-o
returns x
oxx
xoo
ox-
returns -
ox-
-ox
--o
returns o
+ 4
This would be my solution. Kinda crazy and heavily inspired by a post about Connect Four I read a while ago.
https://code.sololearn.com/cOeXWQUN3rpR
+ 2
Third game đ
https://code.sololearn.com/WtRv3JtBdSm5/?ref=app