private static void addKeyListener(JFrame frame) {
		frame.addKeyListener(new KeyAdapter() {
			public void keyPressed(KeyEvent event) {
				int c = event.getKeyCode();
				if (c == KeyEvent.VK_LEFT | c == KeyEvent.VK_A) {
					grid.moveSelectedLeft();
				} else if (c == KeyEvent.VK_RIGHT | c == KeyEvent.VK_D) {
					grid.moveSelectedRight();
				} else if (c == KeyEvent.VK_UP | c == KeyEvent.VK_W) {
					grid.moveSelectedUp();
				} else if (c == KeyEvent.VK_DOWN | c == KeyEvent.VK_S) {
					grid.moveSelectedDown();
				} else if (c >= KeyEvent.VK_0 && c <= KeyEvent.VK_9) {
				 																
					//48 = ascii offset for 0-9			
					if(game != null) {											
						Tile selected = game.getBoard().getTile(
								grid.getSelectedX(), grid.getSelectedY());
						
						Move m = new Move(selected, c - 48, selected.getValue());
						game.makeMove(m);
						
						if (game.finished()) {
							msgLabel.setText("Game Completed!");
							clock.stop();
							hsGui.display(clock.seconds(), game.getDifficulty().ordinal());
						}
					}
				} else if (c == KeyEvent.VK_DELETE
						| c == KeyEvent.VK_BACK_SPACE) {
					Tile selected = game.getBoard().getTile(
							grid.getSelectedX(), grid.getSelectedY());
					Move m = new Move(selected, 0, selected.getValue()); 
					game.makeMove(m);
				}
			}

		});
	}