def _draw_title_text(mdp, screen):
'''
Args:
mdp (simple_rl.MDP)
screen (pygame.Surface)
Summary:
Draws the name of the MDP to the top of the screen.
'''
scr_width, scr_height = screen.get_width(), screen.get_height()
title_split = str(mdp).split("_")
title = title_split[0]
param_text = " ("
for param in title_split[1:-1]:
param_text += param + ", "
param_text += title_split[-1] + ")"
formatted_title_text = title[0].upper() + title[1:] + param_text
title_text = title_font.render(formatted_title_text, True, (46, 49, 49))
screen.blit(title_text, (scr_width / 2.0 - len(formatted_title_text)*6, scr_width / 20.0))
评论列表
文章目录