public String move(Direction d) throws
        OutOfBoardException {

        String message = "";

        int newx = x;
        int newy = y;

        switch(d) {
        case Up:
            newy++ ;
            break;
        case Down:
            newy-- ;
            break;
        case Left:
            newx-- ;
            break;
        case Right:
            newx++ ;
            break;
        }
        if 	(newy <= board.getYSize()
                && newx <= board.getXSize()
                && newy > 0
                && newx > 0)
        {
            Pawn content = board.getSquareContent(newx,newy);
            if (content == null) {
                x = newx;
                y = newy;
            }
            else {
                message = this.attack(content);
            }
        } else {
            throw new OutOfBoardException(newx,newy);
        }

        return message;
    }