protected PingResult pingRight(){
        for(int i = this.posX; i < BattleBotsGUI.instance.xDim; i++) {
            if (i == enemyPosX && this.posY == enemyPosY) {
                return new PingResult(i - this.posX - 1, true);
            }
            else if (BattleBotsGUI.instance.obstacles[i][this.posY]) {
                return new PingResult(i - this.posX - 1, false);
            } 
            else if (i == BattleBotsGUI.instance.xDim - 1)
            {
                return new PingResult(BattleBotsGUI.instance.xDim - this.posX - 1, false);
        	}
        }
        return null;
    }