Domino simulation [SOLVED]
I am trying to write a code which essentially simulates tipping over dominoes sequentially. The best way to express this is through an example run: 0=empty , 1=upright, 2=tipping, 3=horizontal User input is 1 1 1 0 2 1 1 1 0 1 Making the initial configuration: ||| /|||| | So, the following runs would go as follows run 0: /|| _ /|| | (if position 1 is upright, it will always be tipped on the first run) run 1: _/| __/| | until we get to run 4 which looks like this: ___ ____ | The program will run 10 times to ensure all the dominoes are toppled (so in this case, run 4 will look identical to run 10 seeing as it has exhausted all actions). I’m having trouble getting this, some pointers would be greatly appreciated. Below I have written out a basic idea of how I am trying to do this. https://code.sololearn.com/czNfzYk2AJ91/?ref=app