def show_game_shared(selection):
    print html_table([
        [show_selection(selection, 0), show_selection(selection, 1)],
        [show_selection(selection, 2), show_selection(selection, 3)]
    ])

    print '<br />'

    print html_table(
        [['Player', 'Handicap', 'Speed', 'Accel', 'Weight', 'Handling', 'Grip']] +
        [selection_stats(selection, player_number) for player_number in range(4)]
    )
Example #2
0
def show_game_shared(selection):
    print html_table(
        [[show_selection(selection, 0),
          show_selection(selection, 1)],
         [show_selection(selection, 2),
          show_selection(selection, 3)]])

    print '<br />'

    print html_table([[
        'Player', 'Handicap', 'Speed', 'Accel', 'Weight', 'Handling', 'Grip'
    ]] + [
        selection_stats(selection, player_number) for player_number in range(4)
    ])
Example #3
0
def print_page(title, page_content):
    print '''Content-Type: text/html


<html>
<head>
<title>MK8: {}</title>
</head>
'''.format(title)
    for section_type, section_content in page_content:
        if section_type == 'table':
            print html_table(section_content)
        elif section_type == 'text':
            print paragraph(section_content)
        elif section_type == 'important text':
            print bold(paragraph(section_content))
        else:
            raise Exception(
                "I don't know how to deal with this type of content: {}"
                .format(section_type)
            )