Shortest Gomoku (5 in a row) implementation I suspect Gomoku may be one of the simplest games to implement in code. https://en.wikipedia.org/wiki/Gomoku The game is this: players BLACK and WHITE take turns putting down black and white stones. Black traditionally goes first. If, when a player puts down their stone, they now have 5 in a row of their color, they win. That's it. 

A simple way to implement this is to just keep two lists of (x, y) integer coordinates, one for black stones and one for white stones. Players simply specify an integer x,y coordinate, any x,y coordinate at all! The game checks if there is already a stone there of either color, and if not x,y is added to the list, and then the game checks if that stone made them have 5 in a row now.

Notice I have said nothing about board size, or checking if a move is on the board or not. My thought is that specifying board size and determining what to do at edges actually complicates things more! Gomoku can be played on an infinite board, and the game still works actually!

Anyway, to be clear, I believe the specifications are, implement Gomoku on a board of size between or including 15x15 and infinity x infinity (I actually suspect inifinite may be simpler.) Let the user know who's turn it is to play, by alternately printing "b>","w>". If an invalid entry is made, such as playing where there already is a stone there, just keep asking the user who played the invalid move until they play a valid move. To keep things extra short, no need to print the board state, actually! But if on a user's turn, they have completed 5 in a row orthogonaly or diagonally, print, or throw an error, that can simply say "w" or "b", to say who won. Shortest code that does the specified, wins.

If you want to print the board state or make things look nicer or make an AI or whatever, no need to do that, but you can add with or separately to your submission if you feel like it.

I wrote a non-golfed but still shortish implementation in Python, with simple board printing and stuff before. Here it is: https://github.com/jeffkaufman/game-complexity/blob/master/gomoku.py

And here's my entire attempt at a golfed version with the basic IO and move checking, but without board printing. I am quite sure this is not optimal at all, I'm not often a golfer. All I mostly did was make variables one character / remove whitespace and stuff, you guys can *easily* do better, I know.

w,b=[],[]
def o((x,y),s,(v,u)):
 if (x,y) in s:return o((x+v,y+u),s,(v,u))
 if v:return x
 return y
d=((0,1),(1,0),(1,1),(-1,1))
def W(m,s):
 for (x,y) in d:
  if o(m,s,(x,y))-o(m,s,(-x,-y))&gt;5:return 1
 return 0
def t(c,p):
 while 1:
  C=raw_input(c+'&gt;')
  try:
   x,y=C.split()
   m=(int(x),int(y))
  except ValueError:continue
  if m in b+w:continue
  p.append(m)
  if W(m,p):raise Exception(c)
  break
while 1:t("b",b),t("w",w)


an example run from that, which throws a Python error saying who won, at the end: 

b&gt;0 0
w&gt;-4 5
b&gt;0 1
w&gt;0 1
w&gt;7 12
b&gt;0 2
w&gt;7 12
w&gt;4 5
b&gt;0 -1
w&gt;4 4
b&gt;0 3

Traceback (most recent call last):
  File "C:/Users/udqbp/OneDrive/Desktop/test.py", line 22, in &lt;module&gt;
    while 1:t("b",b),t("w",w)
  File "C:/Users/udqbp/OneDrive/Desktop/test.py", line 20, in t
    if W(m,p):raise Exception(c)
Exception: b
Jelly, 54 bytes

Ḋ,Z,ŒD$ŒrFs2ḢƇ&lt;5Ȧ
0x⁹s⁴-;N1¦Ṅ©+Ɠœị®Ḋ¤$¿ṪṬṭ0x$Ʋ¹NƭƊƊ$Ç¿


Try it online!

A full program that reads input on stdin. For each loop through it prints the current player (1 or -1) and the 16x16 grid. Moves are input on stdin as a Python array (e.g. [3,2]) with or without the surrounding square brackets. The only validation done is to make sure that the relevant cell is empty. When there are 5 (or more) in a row, the program ends and prints out the winner and final grid. 

If checking for a valid move can be omitted, 10 bytes can be saved:

Jelly, 44 bytes

Ḋ,Z,ŒD$ŒrFs2ḢƇ&lt;5Ȧ
0x⁹s⁴-;N1¦Ṅ+ƓṪṬṭ0x$¹Nƭ¤ƲÇ¿


Try it online!

Conversely, if the w/b designation in the spec is strict, that costs 15 bytes:

Jelly, 69 bytes

ị“wb ”Ḣ
Ḋ,Z,ŒD$ŒrFs2ḢƇ&lt;5Ȧ
0x⁹s⁴-;N1¦Ñ;”&gt;ṄṛƲ©+Ɠœị®Ḋ¤$¿ṪṬṭ0x$Ʋ¹NƭƊƊ$Ç¿Ñ


Try it online!