map_gen module

class ui.map_gen.Background(screen, image_path)

Bases: Map

class for tiled map

Parameters

Map -- inherit from Map class

display_map()

draw map

is_water(x, y)

test if point (x, y), is on water

Parameters
  • x (int) -- position x of the point

  • y (int) -- position y of the point

Returns

True if on water, otherwise return False

Return type

bool

class ui.map_gen.Map(screen, image_path)

Bases: object

used to load an image and draw it (in the background)

Parameters
  • screen (pygame.Surface) -- surface to draw on

  • image_path (string) -- path to image

display_map()

draw image