That's good... Considering that according to xiangqi rules the player who makes perpetual checks to repeat the same position for the 3rd time will lose the game (third time is an illegal move). That's part of the game rules heh. Without it you're not playing xiangqi.
I'm troubled by the end of your statement - about the stalemate... It makes me wonder if this rule is treated correctly here.
So - for clarification -
A stalemate ISN'T a draw... It's simply the name of a situation in which a player whose turn it is to move has no legal moves but his king is not in check.
That's all it is.
In western Chess, Stalemate is considered a draw. It's just one of many possible draws...it's not another word for a draw...
In xiangqi, stalemate wins the game just like a normal mate. It's an important part of xiangqi endgame theory and changing that rule would totally change the game.
All this was mentioned because stalemate was mentioned in your post where it didn't belong and made no sense so I had to make sure the rules are well understood and implemented.
Just making sure