Algorithm · SoFi · Medium
You are working with a reduced interactive-fiction graph: choices is a collection of choice entries. Every entry is written as choice = [start, op1, op2] and indicates that node start offers exactly two selectable options, op1 and op2. options maps each option op to the node reached after choosing it. endingList contains the IDs of all ending nodes. Create a function that returns the members of endingList that can be reached from startNode, where the player may continue…
Checking your access…