last piece & last block handling is now working, print statements removed. code needs some cleanup/refactoring but is ready for btgames