Different implementation for tic-tac-toe