private void mainKeyPress(KeyEvent e){
			
			currentMessage="";
			if(currentScreenIndex==1){
			int id = e.getID();
			
			if(id==KeyEvent.KEY_RELEASED){
				int keyCode=e.getKeyCode();
				switch (keyCode){
				case(KeyEvent.VK_UP):
					player1.move('8');
					player1.endPlayerTurn();
					return;
				case(KeyEvent.VK_DOWN):
					player1.move('2');
        			player1.endPlayerTurn();
        			return;
				case(KeyEvent.VK_LEFT):
        			player1.move('4');
        			player1.endPlayerTurn();
        			return;
				case(KeyEvent.VK_RIGHT):
					player1.move('6');
        			player1.endPlayerTurn();
        			return;
				}
			}
        	
	        if (id == KeyEvent.KEY_TYPED) {	//the second condition is specific to the main screen.
	            char c = e.getKeyChar();
	            if(Character.isDigit(c)){
	            	
	            	player1.move(c);
	            	player1.endPlayerTurn();
	            }
	            else //if(Character.isLetter(c))
	            	playerCommand(c);
	            refreshScreen();
	        }
		}
	}