Made all pieces store their location and not rely on it being fed from outside. Made them all use the legalMove from Piece and not their own ones since no pieces needed external treatment there.
Also made grid not spawn pieces on copy.
made board keep track of pieces in separate table in addition to being scattered all around the board
Made isSquareInCheck use the piece table instead of scanning through the board
made isKingInCheck use the piece table for locating the king
fix bug regarding capturing from the piece table, and add a function for debuggin it