// WORLD FUNCTION wf1() // // IDEA // // The world function as part of the WORLD computes all // necessary changes in a world within one WORLD CYCLE. // // wf: W ---> W // // The wf() manages possible changes according to the actual GRIDSPC, the content // of the WIB as well of POP and according to some world laws. // // wf1 = newPOS o newMOVE o newSOUND // // The change of the images happens associated with the newMOVE or nmove operations // // - 'F' can 'disappear' by changing into '.' // - '.' can change to 'F' by 'growing' // - '*i' can change the 'positon' by a 'move' // // LAWS // // - Only one object at a position at one time. This means, if a system will move to a position (X,Y) // and at this position is already an object 'O', 'F' or '*j', then this move is not possible. // It will result in a 'collision message'. // // - If more than one system plans to move at a point of time t, then the order of moves will be 'random' // //********************************************************** // wf1-HELPER FUNCTIONS // // insertPOP() := at start time this will place the systems from POP into the GRIDSPC once // // newPOS() := takes the move-command from WIB and computes a new position (as well as // the non-move actions in random test cases) // // newPOSPOS() := checks randomly whether the new position is possible; if yes then this will be realized // (as well as the non-move actions in random test cases) // // newSOUND() := realizes a SAY and a coded SOUND.