All pastes #32193 Raw Edit

Miscellany

public text v1 · immutable
#32193 ·published 2005-12-03 03:49 UTC
rendered paste body
enum {
	KING_PIECE,
	QUEEN_PIECE,
	BISHOP_PIECE,
	KNIGHT_PIECE,
	ROOK_PIECE,
	PAWN_PIECE,
	TOTAL_PIECES
};

pfDCS** chessPiecesWhite[TOTAL_PIECES];
pfDCS** chessPiecesBlack[TOTAL_PIECES];

// and segfault next line
chessPiecesWhite[KING_PIECE] = new pfDCS*[1];
chessPiecesWhite[QUEEN_PIECE] = new pfDCS*[1];
chessPiecesWhite[BISHOP_PIECE] = new pfDCS*[2];
chessPiecesWhite[KNIGHT_PIECE] = new pfDCS*[2];
chessPiecesWhite[ROOK_PIECE] = new pfDCS*[2];
chessPiecesWhite[PAWN_PIECE] = new pfDCS*[8];

chessPiecesBlack[KING_PIECE] = new pfDCS*[1];
chessPiecesBlack[QUEEN_PIECE] = new pfDCS*[1];
chessPiecesBlack[BISHOP_PIECE] = new pfDCS*[2];
chessPiecesBlack[KNIGHT_PIECE] = new pfDCS*[2];
chessPiecesBlack[ROOK_PIECE] = new pfDCS*[2];
chessPiecesBlack[PAWN_PIECE] = new pfDCS*[8];