      subroutine potts_ran(ista,ns,nq)
C Assigns random (i.e. beta=0) values 0,..,nq-1 to the states ista(is).
      include 'implicit.sta'
      dimension ista(ns)
      q=float(nq)
      do is=1,ns
      call ranmar(xr)
      ista(is)=int(q*xr)
      end do
      return
      end
