Unity's roll-a-ball tutorial (https://unity3d.com/learn/tutorials/s/roll-ball-tutorial) with some modifications and added UnityTests.