Nearly finishes ismate() fn. Adds necessary params to legal.c and move.c fns.