mod in typedef
mod in castle move gen
added terminatesoft as tunebale parameter