.net port and adaptation of libots, initially ported by PatrickBurrows