Do you see any obvious mistakes in this part of code? (handle is a java RandomAccessFile-object). After some testing, at least it does remove the huts and it doesn't have any side-effects as obvious as turning the whole map into river (which was the result of my first attempt ).
Code:
int fertility; final int owner=0;//240 = no owner; 0 = barbarians; for(int i=0; i < SURFACE ; i++){ handle.seek( OFFSET_MAP_BLOCK2+6*i+5 ); fertility = handle.read() % 16; handle.seek( OFFSET_MAP_BLOCK2+6*i+5 ); handle.write( owner + fertility ); }
Comment