@Override
	public MoveList getMoves(int color, Position pos) {
		MoveList moves = new MoveList();

		if (pos.getRank(color) == 2) {
			moves.add(Arrays.asList(new ChessMove[] {
					new PawnMove(color, pos, pos.offset(color, 1, 0)),
					new PawnMove(color, pos, pos.offset(color, 2, 0),
							new SetEnPassant(pos.offset(color, 1, 0))) }));
		} else if (pos.getRank(color) == 7) {
			for (ChessMove move : getPromotions(color, pos,
					pos.offset(color, 1, 0), false)) {
				moves.add(move);
			}
		} else {
			moves.add(new PawnMove(color, pos, pos.offset(color, 1, 0)));
		}

		if (pos.getRank(color) == 7) {
			for (ChessMove move : getPromotions(color, pos,
					pos.offset(color, 1, 1), true)) {
				moves.add(move);
			}
			for (ChessMove move : getPromotions(color, pos,
					pos.offset(color, 1, -1), true)) {
				moves.add(move);
			}
		} else {
			moves.add(new PawnCapture(color, pos, pos.offset(color, 1, 1)));
			moves.add(new PawnCapture(color, pos, pos.offset(color, 1, -1)));
		}

		if (pos.getRank(color) == 5) {
			moves.add(new EnPassant(color, pos, pos.offset(color, 1, 1)));
			moves.add(new EnPassant(color, pos, pos.offset(color, 1, -1)));
		}

		return moves;
	}