Talk:Complete Roguelike Tutorial, using python+libtcod, part 1

From RogueBasin
Revision as of 16:48, 18 October 2010 by Relet (talk | contribs) (Created page with 'Instead of the awkward <div style="padding: 5px; border: solid 1px #C0C0C0; background-color: #F0F0F0"><syntaxhighlight lang="python"> if not first_time: </syntaxhighlight></…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Instead of the awkward

    if not first_time:

may I suggest to just put things in the order in which they are meant to be executed?

    libtcod.console_set_foreground_color(0, libtcod.white)
    libtcod.console_print_left(0, playerx, playery, libtcod.BKGND_NONE, '@')
    libtcod.console_flush()
    libtcod.console_print_left(0, playerx, playery, libtcod.BKGND_NONE, ' ')

    exit = handle_keys()
    if exit:
        break

-- relet 16:48, 18 October 2010 (UTC)