public void updateDirection(SnakePart s){
		if(s.x >= wa || s.y >= ha || s.x < 0 || s.y < 0){
			gameEnd();
			return;
		}
		
		int dir = board[(int) s.x][(int) s.y];
		
		if(dir==1){
			s.xD = 0;
			s.yD = 1;
		}
		if(dir==2){
			s.xD = -1;
			s.yD = 0;
		}
		if(dir==3){
			s.xD = 0;
			s.yD = -1;
		}
		if(dir==4){
			s.xD = 1;
			s.yD = 0;
		}
		
		if(snake.get(snake.size() - 1) == s){
			board[(int) s.x][(int) s.y] = 0;
		}
	}