mslehre / MAS

Maximum Acyclic Subgraph (MAS) - Multiple Sequence Alignment (MSA) Game
1 stars 0 forks source link

sLt4 calculate and display current score #75

Closed TimonKapischke closed 5 years ago

TimonKapischke commented 5 years ago

Add the score into Graphrendere.cc and update him when you set a new edge.

felbecker commented 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).

TimonKapischke commented 5 years ago

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.

felbecker commented 5 years ago

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.