Good thinking! If you had used mortar, you would have had to lay a footing. If no footing, the settling would have cracked the mortar, or your blocks, in a matter of weeks.

I try to make mostly wooden pens, but people sometimes offer me free blocks. I've found that stacking them without mortar is very handy when you want to make adjustments. For a cap, I buy the flat blocks...I place a strip of hardware mesh between the wall and the cap, extending it about 3 inches out into the pen. Nothing can climb past that, but it does look somewhat conspicuous.