-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
32 lines (26 loc) · 908 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Main
# Author: Caleb Kisby
# Date: Jun.3.15
#
# Tests the level generator, object movement, and key presses.
from menu_manager import *
import tkinter as tk
def main():
# Set arbitrary game dimensions.
tile_length = 64 #Tile length
canvas_width = 16 #Canvas' width in tiles
canvas_height = 10 #Canvas' height in tiles
# Draw the canvas.
root = tk.Tk()
canvas = tk.Canvas(width=tile_length * canvas_width,
height=tile_length*canvas_height,
background="black")
canvas.pack()
root.resizable(width=0, height=0)
# Initialize the menu manager and start the game state.
menu_manager = MenuManager(root, canvas, "graphics/maps/sample_map.gif",
tile_length, canvas_width, canvas_height)
menu_manager.start_menu()
root.mainloop()
if __name__ == "__main__":
main()