This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""003_static_blit_pretty_template.py""" | |
import pygame | |
import random | |
def make_text(msg="pygame is cool", fontcolor=(255, 0, 255), fontsize=42, font=None): | |
"""returns pygame surface with text. You still need to blit the surface.""" | |
myfont = pygame.font.SysFont(font, fontsize) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
# legend: #=rock .=floor f=food $=gold | |
DUNGEON = ''' | |
############################################### | |
#.....fff.#..............#f#.$#.....#.......#$# | |
#....S....#..............###....###.#.....#.#.# | |
#....S.S..f.....$...f.........##$......f..#...# | |
############################################### | |
''' # add more lines to the dungeon! | |
PLAYER = '@' |