Closed TimonKapischke closed 5 years ago
GraphRenderer
does currently only draw Graphs
not States
. Adding the score only makes sense if states (consistent subsets of edges) are displayed. Then, the score can automatically be displayed along with the state, that is rendered (as "calculate score" is a member method of state
anyway).
GraphRenderer
has a state. I've just called the calculate_score()
function from this state if a new edge is set. This score will be displayed on the console at the moment. In sLt4 I will write the code for displaying the score at the GUI.
Ah, I see. But I does make no sense that the GraphRenderer
is also responsible for the GameState
. The state should be handled somewhere else and should be passed to the renderer when drawing. However, you can write the code that displays the score using the member-state. We can replace the member state with a function argument later.
Add the score into Graphrendere.cc and update him when you set a new edge.