Impurity Trapping during Dendritic Crystal Growth. 1. Computer Simulation