Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pgzero
- import random
- # Игровое окно из клеток
- cell = Actor('border')
- cell1 = Actor("crack")
- cell2 = Actor('floor')
- cell3 = Actor('bones')
- size_w = 10 # Ширина поля в клетках
- size_h = 10 # Высота поля в клетках
- WIDTH = cell.width * size_w
- HEIGHT = cell.height * size_h
- TITLE = "Подземелья" # Заголовок окна игры
- FPS = 30 # Количество кадров в секунду
- my_map = [[0]*size_w]*size_h
- def generate_map():
- global my_map
- for i in range(size_w):
- for j in range(size_h):
- if not i == 0 and not i == (size_w -1):
- if not j == 0 and not j == (size_w -1):
- my_map[i][j] = random.randint(1,3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement