Enabled the window to be resizable.

Instead of relying on the DISPLAYWIDTH and DISPLAYHEIGHT constants, the
code uses windowWidth and windowHeight that changes if the user changes
the window size.