Implement a class for playing Gomoku.