The way to play is to "warp" each side of the board to the side opposite of it. For instance, playing on a 6x6 board with a win condition of length 5:
.|X|.|.|.|.
X|.|.|.|.|.
.|O|.|.|.|.
.|O|.|.|X|.
.|.|O|X|.|.
.|.|X|O|.|.
is a win for X, because the upper and lower ends of the board are synonymous.I can't find any material about this on the net, I just played it in school on boring lessons (but more commonly we played for 5 in a row on an infinite board, I personally prefer the Torus)