added Edge class that represent connection between two nodes
and also provided another strategy that determines whether or not
connection to the given edge is possible.List of edges is kept
within each node