Atlassian FS browser coding

I was asked to build a tic tak toe game for 3 by 3 grid.
Later asked to calculate the winner