Computer simulation of planet formation in a binary star system: Terrestrial planets