@@ -0,0 +1,2046 @@
+/**%0A *%0A * @author Ryan J. Marcotte%0A */%0A%0Apackage game;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0A%0Apublic class Pawn extends ChessPiece%0A%7B%0A    boolean hasNotMoved;%0A    %0A    public Pawn(Square location)%0A    %7B%0A        hasNotMoved = true;%0A        setLocation(location);%0A        setPossibleMoves(new ArrayList%3CInteger%3E());%0A        setTeamFromInitialLocation(location);%0A    %7D%0A%0A    protected ArrayList%3CSquare%3E generateMoveLocations()%0A    %7B%0A        ArrayList%3CSquare%3E moveList = new ArrayList%3C%3E();%0A%0A        int neighborDirection;%0A        Square neighbor;%0A        Square currentLocation = getLocation();%0A        %0A%0A        if (getTeam() == Team.WHITE)%0A            neighborDirection = 0;%0A        else%0A            neighborDirection = 4;%0A%0A        neighbor = currentLocation.getNeighbor(neighborDirection);%0A%0A        // should we add square right in front of us?%0A        if (neighbor != null && !neighbor.isOccupied()) %7B%0A            moveList.add(neighbor);%0A%0A            neighbor = neighbor.getNeighbor(neighborDirection);%0A%0A            // should we add square two spaces in front of us?%0A            if (hasNotMoved && neighbor != null && !neighbor.isOccupied())%0A                moveList.add(neighbor);%0A        %7D%0A%0A        int captureDirections%5B%5D = new int%5B2%5D;%0A        captureDirections%5B0%5D = (neighborDirection + 7) %25 8;%0A        captureDirections%5B1%5D = (neighborDirection + 9) %25 8;%0A        %0A        for (int i = 0; i %3C captureDirections.length; i++) %7B%0A            neighbor = currentLocation.getNeighbor(captureDirections%5Bi%5D);%0A%0A            if (neighbor != null && neighbor.isOccupied()) %7B%0A                ChessPiece occupant = neighbor.getOccupant();%0A                Team ourTeam = getTeam();%0A                Team theirTeam = occupant.getTeam();%0A                %0A                if (ourTeam != theirTeam)%0A                    moveList.add(neighbor);%0A            %7D%0A        %7D%0A%0A        Collections.sort(moveList);%0A%0A        return moveList;%0A    %7D%0A%0A    protected void setHasNotMoved(boolean hasNotMoved)%0A    %7B%0A        this.hasNotMoved = hasNotMoved;%0A    %7D%0A%7D%0A

add Pawn functionality for generating moves