Starspot Mapping with Adaptive Parallel Tempering. I. Implementation of Computational Code