Frontend Phone Screen from Meta

In February, a tic-tac-toe game on an m*n grid was discussed. Write a function to check if the game is finished by checking the four sides and two diagonal sides, then verbally discuss the test case.