Updated Graph.java

Starting to add Q-Value Implementation.
Note: incorrect updating implemented. Will fix soon.