public GUI(){
		frame = new JFrame();
		board = new Board();
		board_panel = new BoardPanel(board);
		next_piece_panel = new NextPiecePanel(board);
		sound = true;
		effects = true;
		timer = new Timer(1000, new ActionListener(){
			
			/**
			 * An override of the Action Performed method.
			 */
			@Override
			public void actionPerformed(final ActionEvent arg0) {
				board.movePieceDown();
				board_panel.repaint();
				next_piece_panel.repaint();
				//System.out.println(board.currentPiece.my_location);
			}
		});

		frame.addKeyListener(new KeyAdapter(){

			/**
			 * Uses the Keytyped method to determine the key typed.
			 */
			@Override
			public void keyTyped(final KeyEvent e) {
				if(e.getKeyChar() == KeyEvent.VK_4){
					board.movePieceLeft();
				} else if(e.getKeyChar() == KeyEvent.VK_6){
					board.movePieceRight();
				} else if(e.getKeyChar() == KeyEvent.VK_2){
					board.movePieceDown();
				} else if(e.getKeyChar() == KeyEvent.VK_5) {
					board.rotate();
				} else if(e.getKeyChar() == KeyEvent.VK_0){
					board.fallPiece();
				}
				board_panel.repaint();
				next_piece_panel.repaint();
			}

		});
		
		
	}