Skip to content
Pavel Kulyov edited this page Mar 16, 2017 · 2 revisions

What’s now

Module render provides:

  • Class Renderable, that forces get_render_data method for all classes that want to be rendered at screen
    • remove_obsolete (Point): serves as signal to remove bullet behind the screen area (Need to be redisigned)
    • get_render_data (None) -> (gpos_list, data_gen)
      • gpos_list (list of Points): list of global coordinates of objects that will be rendered at this call
      • data_gen (Generator): generator that yields tuple (lpos, image, style)
        • lpos (Point): local position of current Surface’s piece
        • image (str): one symbol for rendering
        • style (int): curses style mask (A_BOLD, A_BLINK, …)
        • Example: (Point(x=5, y=5), “*”, curses.A_BOLD)
  • render_objects (objects, screen) function
    • objects (list of Renderable): objects to be rendered
    • screen (curses._Window): curses window object that have methods `addch’, `addstr’ and etc.
    • rendering algorithm: will be soon

Planned design

will be soon

Clone this wiki locally