Commit 4fb8de32 authored by Julian Rudolf's avatar Julian Rudolf
Browse files

ui changes

map icons
parent de90fdc3
......@@ -74,6 +74,9 @@ p1_icon = pygame.image.load('data/snake_images/p1_icon.png')
p2_icon = pygame.image.load('data/snake_images/p2_icon.png')
p3_icon = pygame.image.load('data/snake_images/p3_icon.png')
p4_icon = pygame.image.load('data/snake_images/p4_icon.png')
map3_icon = pygame.image.load('data/map3_icon.png')
map5_icon = pygame.image.load('data/map5_icon.png')
map6_icon = pygame.image.load('data/map6_icon.png')
p1_snake = green_head, green, green_start, green_win, green_win_end, green_lost, green_lost_end
p2_snake = purple_head, purple, purple_start, purple_win, purple_win_end, purple_lost, purple_lost_end
......@@ -106,8 +109,8 @@ map_filename = '../Shield/maps/map6.pickle'
# map and start position
startsnake1, startsnake2 = maps.start6
map = maps.map6
snake_length = 30
tmp_snake_length = 30
snake_length = 20
tmp_snake_length = 20
apples = [(set([]), green_apple), (set([]), purple_apple)]
bombs = [(set([]), bomb_img)]
......@@ -817,10 +820,10 @@ def select_map():
message_screen("If different maps are selected, its random choice", grey, -300, "small")
message_screen("Map1", black, pos1[1], "small", pos1[0])
message_screen("Map2", black, pos2[1], "small", pos2[0])
message_screen("Map3", black, pos3[1], "small", pos3[0])
image_screen(map3_icon, pos3)
message_screen("Map4", black, pos4[1], "small", pos4[0])
message_screen("Map5", black, pos5[1], "small", pos5[0])
message_screen("Map6", black, pos6[1], "small", pos6[0])
image_screen(map5_icon, pos5)
image_screen(map6_icon, pos6)
while map_select:
for event in pygame.event.get():
......@@ -887,17 +890,17 @@ def select_map():
p1_map = maps.map3
p1_map_filename = '../Shield/maps/map3.pickle'
p1_start = maps.start3
p1_length = 15
p1_length = 20
elif p1_pos == pos5:
p1_map = maps.map5
p1_map_filename = '../Shield/maps/map5.pickle'
p1_start = maps.start5
p1_length = 15
p1_length = 20
elif p1_pos == pos6:
p1_map = maps.map6
p1_map_filename = '../Shield/maps/map6.pickle'
p1_start = maps.start6
p1_length = 30
p1_length = 20
if p2_pos == pos3:
p2_map = maps.map3
......
......@@ -161,12 +161,12 @@ map3 = [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1],
# [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]
start5 = [{"pos": [[6,1],[5,1],[4,1],[3,1],[3,2],[3,3],[3,4],[2,4],[2,5],[2,6],[2,7],[2,8],[2,9],[3,9],[3,10]],
"vel": [[0,1],[0,1],[0,1],[-1,0],[-1,0],[-1,0],[0,1],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[0,-1],[-1,0],[0,-1]],
start5 = [{"pos": [[6,1],[5,1],[4,1],[3,1],[3,2],[3,3],[3,4],[2,4],[2,5],[2,6],[2,7],[2,8],[2,9],[3,9],[3,10],[4,10],[4,11],[4,12],[4,13],[5,13]],
"vel": [[0,1],[0,1],[0,1],[-1,0],[-1,0],[-1,0],[0,1],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[0,-1],[-1,0],[0,-1],[-1,0],[0,-1],[0,-1],[0,-1],[-1,0]],
"angle": 'right'},
{"pos": [[25,15],[25,16],[25,17],[25,18],[25,19],[25,20],[25,21],[25,22],[25,23],[25,24],[25,25],[25,26],[25,27],[25,28],[24,28]],
"vel": [[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[0,1],[0,1]],
{"pos": [[25,15],[25,16],[25,17],[25,18],[25,19],[25,20],[25,21],[25,22],[25,23],[25,24],[25,25],[25,26],[25,27],[25,28],[24,28],[24,28],[23,28],[22,28],[21,28],[20,28]],
"vel": [[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1],[0,1]],
"angle": 'left'}]
map5 = [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
......@@ -208,12 +208,12 @@ map5 = [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
# "vel": [[0,-1],[0,-1],[0,-1],[0,-1],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0]],
# "angle": 'right'}]
start6 = [{"pos": [[6,5],[5,5],[4,5],[3,5],[2,5],[2,6],[2,7],[2,8],[2,9],[2,10],[2,11],[2,12],[2,13],[2,14],[2,15],[2,16],[2,17],[2,18],[2,19],[2,20],[2,21],[2,22],[2,23],[2,24],[2,25],[2,26],[2,27],[2,28],[2,29],[2,0]],
"vel": [[0,1],[0,1],[0,1],[0,1],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0]],
start6 = [{"pos": [[6,5],[5,5],[4,5],[3,5],[2,5],[2,6],[2,7],[2,8],[2,9],[2,10],[2,11],[2,12],[2,13],[2,14],[2,15],[2,16],[2,17],[2,18],[2,19],[2,20]],#[2,21],[2,22],[2,23],[2,24],[2,25],[2,26],[2,27],[2,28],[2,29],[2,0]],
"vel": [[0,1],[0,1],[0,1],[0,1],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0]],#[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0]],
"angle": 'right'},
{"pos": [[21,25],[22,25],[23,25],[24,25],[25,25],[25,24],[25,23],[25,22],[25,21],[25,20],[25,19],[25,18],[25,17],[25,16],[25,15],[25,14],[25,13],[25,12],[25,11],[25,10],[25,9],[25,8],[25,7],[25,6],[25,5],[25,4],[25,3],[25,2],[25,1],[25,1]],
"vel": [[0,-1],[0,-1],[0,-1],[0,-1],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0]],
{"pos": [[21,25],[22,25],[23,25],[24,25],[25,25],[25,24],[25,23],[25,22],[25,21],[25,20],[25,19],[25,18],[25,17],[25,16],[25,15],[25,14],[25,13],[25,12],[25,11],[25,10]],#[25,9],[25,8],[25,7],[25,6],[25,5],[25,4],[25,3],[25,2],[25,1],[25,1]],
"vel": [[0,-1],[0,-1],[0,-1],[0,-1],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0]],#[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0]],
"angle": 'right'}]
map6 = [[1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment