import loadSource

from pyglet.gl import *
from game import Game

WINDOW_WIDTH = 800
WINDOW_HEIGHT = 600

def main():


    game = Game(width=WINDOW_WIDTH, height=WINDOW_HEIGHT, caption='CraftMaster', resizable=True)
    game.buildSound = loadSource.BUILDSOUND
    game.destroySound = loadSource.DESTROYSOUND
    game.backgroundMusic = loadSource.BACKGROUNDMUSIC
    game.set_icon(loadSource.ICON)
    # Hide the mouse cursor and prevent the mouse from leaving the window.
    game.set_exclusive_mouse(True)
    game.backgroundMusic.play()
    pyglet.app.run()



if __name__ == '__main__':
    main()