changed piecesColor array to a 1-dimensional array
checkSpaces function checks for valid spaces
pieces can be moved to empty spaces or to spaces with pieces of the same color