public Gui(boolean twoPlayer, int x, int y, int width, int height) {
		super("Hivolts");
		p2 = twoPlayer;
		if(width == 0 || height == 0) {
			WIDTH = x*50 + 100;
			HEIGHT = y*50 + 100;
		}
		else {
			WIDTH = width;
			HEIGHT = height;
		}
		rows = x;
		cols = y;
		setPreferredSize(new Dimension(WIDTH, HEIGHT));
		grid = new GridPanel(twoPlayer, x, y, this);
		add(grid);
		setVisible(true);
		pack();
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		this.addKeyListener(this);
	}