public ChessBoardBulider SetPawnInTwoCorner(PawChess pawnType, int height, int firstWidth, PawColors color) { int secendWidth = maxWidth - firstWidth + 1; SetPawn(pawnType, height, firstWidth, color); SetPawn(pawnType, height, secendWidth, color); return(this); }
public ChessBoardBulider SetAllPawnInHeigh(PawChess pawnType, int height, PawColors color) { for (int i = 1; i <= maxWidth; i++) { SetPawn(pawnType, height, i, color); } return(this); }
public ChessBoardBulider SetPawn(PawChess pawnType, int height, int width, PawColors color) { //Przydała by się walidacja var pawn = KernelInstance.Get <IPawn>(); pawn.Color = color; pawn.ID = pawId; pawn.Type = (PawType)pawnType; IField field = KernelInstance.Get <IField>(); field.Heigh = height; field.Width = width; field.Pawn = pawn; fieldList.Add(field); pawId++; return(this); }