public InternalBoard() { board = new Piece[GlobalVars.GRID_SIZE, GlobalVars.GRID_SIZE]; externalBoard = ExternalBoard.Instance; //Setting up lists playerPieceLists = new Dictionary <PieceColour, List <Piece> >(); playerPieceLists.Add(PieceColour.White, new List <Piece>()); playerPieceLists.Add(PieceColour.Black, new List <Piece>()); if (GlobalVars.gameType == GameType.FourPlayer) { playerPieceLists.Add(PieceColour.Red, new List <Piece>()); playerPieceLists.Add(PieceColour.Yellow, new List <Piece>()); } }
void Awake() { Instance = this; //Initializing Dictionaries and Array colourDict = new Dictionary <PieceColour, Material>(); typeDict = new Dictionary <PieceType, GameObject>(); board = new GameObject[GlobalVars.GRID_SIZE, GlobalVars.GRID_SIZE]; //Setting up dictionaries colourDict.Add(PieceColour.Black, blackPieceMat); colourDict.Add(PieceColour.White, whitePieceMat); colourDict.Add(PieceColour.Red, redPieceMat); colourDict.Add(PieceColour.Yellow, yellowPieceMat); typeDict.Add(PieceType.King, kingPrefab); typeDict.Add(PieceType.Queen, queenPrefab); typeDict.Add(PieceType.Bishop, bishopPrefab); typeDict.Add(PieceType.Knight, knightPrefab); typeDict.Add(PieceType.Rook, rookPrefab); typeDict.Add(PieceType.Pawn, pawnPrefab); }