Skip to content

Instantly share code, notes, and snippets.

@dheerajrav
Created October 9, 2012 10:34
Show Gist options
  • Save dheerajrav/3857871 to your computer and use it in GitHub Desktop.
Save dheerajrav/3857871 to your computer and use it in GitHub Desktop.
Input/Output for cops and robbers

Input/Moves made

First Move: Cop

C
19 19 0 0 0 0 0 0

Output

0 1 0 1 1 0

First Move: Dr Jakoof

R
19 19 0 0 0 0 0 0

The input doesn't contain the immediate move made by the cop. It contains the previous position of the cop. i.e.,

0 0 0 0 0 0

and not

0 1 0 1 1 0

Output

18 18

Second Move: Cop

C
18 18 0 1 0 1 1 0

The second move contains the previous moves made by the cop as well as robber. Cop makes the next move based on this input.

Output

0 2 1 1 2 0

Here are some of the next set of inputs and outputs

R
18 18 0 1 0 1 1 0

17 17 

C
17 17 0 2 1 1 2 0

0 2 1 2 2 1

R
17 17 0 2 1 1 2 0

16 16

C
16 16 0 2 1 2 2 1
0 3 2 2 3 1

R
16 16 0 2 1 2 2 1

15 15

C
15 15 0 3 2 2 3 1

0 4 2 2 3 1

R
15 15 0 3 2 2 3 1

14 14

C
14 14 0 4 2 2 3 1

0 4 2 3 4 1

R
14 14 0 4 2 2 3 1

13 13

C
13 13 0 4 2 3 4 1

0 5 2 4 5 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment