Inform 7 Notes — 11 of 35

Bart Massey

Release 1

Section - Computer Play

Carry out Nimrod moving:

say "Nimrod ponders the situation ponderously...[line break]";

let q be 0;

repeat with p running through the list of nonempty pits:

let n be the stone count of p;

bit-xor n into q;

repeat with p running through the list of nonempty pits:

let n be the stone count of p;

let r be the n bit-xor q;

if n > r:

let t be n - r;

try Nimrod taking t stones from p instead;

let m be pit one;

repeat with p running through the list of nonempty pits:

let nm be the stone count of m;

let np be the stone count of p;

if np > nm:

now m is p;

try Nimrod taking 1 stones from m.