all done and ugly :)

The interchangeable vars c4array and c4board (both which should use a _ like this "c4_[type]" throughout the code is very confusing and it's not immediately clear how they are used. Better var names and/or comments would clear this up confusion up for another reviewer or your future self.