use inheritance to represent start, end, and wall nodes.