Implemented bg pmove code in C#.