This is a 2 player connect the dots game called Hold That Line.
It was created by Sid Sackson and was originally played with pen
and paper.
Rules:
The game is played on a 4x4 grid of 16 nodes. Players take turns
drawing octilinear lines connecting nodes. Each line must begin
at the start or end of the existing path, so that all lines form
a continuous path. The first line may begin on any node. A line
may connect any number of nodes. Lines may not intersect. No
node can be visited twice. The game ends when no valid lines can
be drawn. The player who draws the last line is the loser.
Definitions:
Octilinear line - a horizontal, vertical, or 45° diagonal line