changed inheritance in Piece and made a parent class Location to the children classes Vertex and Edge