Fixed the select function so that it returns a number pair that can be
used in a 2d array to select a piece.