game.ui.happiness_graph

Classes

HappinessGraph

A UI component to display villager happiness over time.

Module Contents

class game.ui.happiness_graph.HappinessGraph(width=200, height=100)[source]

A UI component to display villager happiness over time.

width = 200[source]
height = 100[source]
x = 690[source]
y = 120[source]
bg_color = (20, 20, 20, 180)[source]
font[source]
surface[source]
render(screen, history)[source]

Render the happiness graph onto the screen. :param screen: The main pygame screen surface. :param history: A list of recent happiness values (0.0 to 1.0). :type history: list