game.ui.combined_graph

Attributes

MAX_DATA_POINTS

GRAPH_WIDTH

GRAPH_HEIGHT

GRAPH_X

GRAPH_Y

Classes

CombinedGraph

Displays ecosystem health, villager happiness, and pig count on one graph.

Module Contents

game.ui.combined_graph.MAX_DATA_POINTS = 200[source]
game.ui.combined_graph.GRAPH_WIDTH = 200[source]
game.ui.combined_graph.GRAPH_HEIGHT = 150[source]
game.ui.combined_graph.GRAPH_X = 690[source]
game.ui.combined_graph.GRAPH_Y = 10[source]
class game.ui.combined_graph.CombinedGraph[source]

Displays ecosystem health, villager happiness, and pig count on one graph.

rect[source]
font[source]
health_data = [][source]
happiness_data = [][source]
pig_data = [][source]
health_color = (80, 220, 80)[source]
happiness_color = (80, 160, 255)[source]
pig_color = (255, 160, 40)[source]
add_data_point(degradation, happiness, pig_count)[source]

Record one sample. Pig count is normalised against HAPPINESS_MAX_PIG_COUNT.

render(screen)[source]