Testfest for homework 4

Test cases are in rows. Programs submitted by pairs are in columns.

In each cell, a check mark indicates that the program passed the test. A cross, that it failed the test. A squiggle, that it passed for some combinations of pretty-printed or one-line output, and rapidly-transmitted vs trickle-fed output, but failed for other combinations.

Pairs are identified by the last four digits of their NUIDs (in the same order as their CCS ids appear in their class repo name). Tests are identified similarly, but with the addition of the test number after the two NUID fragments.

Each cell in each row in the matrix is a hyperlink to the test case inputs and outputs.

Results matrix

Test case 0357-6344 0623-8070 0807-2367 1073-6112 1606-4071 2198-0067 2598-8949 2657-7498 3461-8179 3731-4890 3830-7214 3982-5430 5223-6080 6118-3959 7013-1976 7391-9951 7469-3561 7920-7167 9159-5803 9634-1853
0357-6344-3
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
0623-8070-1
×
×
×
×
×
×
×
×
×
×
×
×
×
×
2198-0067-2
×
×
×
×
×
×
×
×
×
2198-0067-5
×
×
×
×
×
×
×
×
×
×
×
×
×
2657-7498-1
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
2657-7498-3
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
2657-7498-4
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
2657-7498-5
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
3461-8179-3
×
×
×
×
×
×
×
×
×
×
×
×
×
3461-8179-4
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×
3461-8179-5
×
×
×
×
×
×
×
×
×
5223-6080-3
×
×
×
×
×
×
×
×
×
6118-3959-3
×
×
×
×
×
7013-1976-4
×
×
×
×
×
×
7469-3561-3
×
9159-5803-3
×
×
×
×
×
×
9159-5803-5
×
×
×
×
×
×
×
×
×
×
×
×
×
×
×

Test cases

0357-6344-3

Input:

      ["start-round", [[6, 3], [20, 2], [50, 3], [12, 6], [33, 2], [74, 5], [24, 7], [53, 4], [67, 5], [45, 3]]]


   ["take-turn", [[[15, 6]], [[2, 7], [31, 3], [86, 5]], [[5, 3], [55, 2]], [[1, 3], [99, 2], [102, 3]]]]



      ["take-turn", [[[15, 6]], [[2, 7], [31, 3], [86, 5]], [[5, 3], [55, 2]], [[1, 3], [99, 2], [102, 3]]]]


 ["choose", [[[15, 6]], [[2, 7], [31, 3], [86, 5]], [[5, 3], [55, 2]], [[1, 3], [99, 2], [102, 3]]]]


      ["take-turn", [[[15, 6]], [[2, 7], [31, 3], [86, 5]], [[5, 3], [55, 2]], [[1, 3], [99, 2], [102, 3]]]]



Output:

true [74, 5] [67, 5] [[5, 3], [55, 2]] [53, 4]

0623-8070-1

Input:

["start-round", [[5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3], [5, 3]]]
["take-turn", [[[3, 4]], [[6, 4]], [[5, 4]], [[4, 4]]]]
["take-turn", [[[3, 4]], [[6, 4]], [[5, 4]], [[4, 4]]]]
null
["take-turn", [[[3, 4]], [[6, 4]], [[5, 4]], [[4, 4]]]]

Output:

true
[5, 3]
[5, 3]

2198-0067-2

Input:

["choose", [[[1,2], [2,2]], [[56, 2], [62,2]], [[12, 2], [15,2]], [[3,2], [4,2]]]]

Output:

false

2198-0067-5

Input:

["start-round", [[11,2],[2,2],[3,2],[4,2],[5,2],[6,2],[7,2],[8,2],[9,2],[10,2]]]
["choose", [[[13,2], [12,2]], [[1,2]], [[68,2], [79,2], [102,2]], [[56,2], [57,2]]]]

Output:

true
false

2657-7498-1

Input:

[
   "start-round",
   [
      [ 13, 2],
      [  2, 2],
      [ 44, 2],
      [ 64, 3],
      [ 37, 5],
      [  3, 3],
      [101, 4],
      [104, 5],
      [ 26, 3],
      [ 11, 5]
   ]
]

["take-turn",
   [
      [[3, 3], [4, 4]],
      [[3, 3], [4, 4]],
      [[5, 5], [7, 7]],
      [[2, 2]]
   ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[104, 3], [4, 4]],
    [[104, 3], [4, 4]],
    [[104, 5], [7, 7]],
    [[104, 7]]
  ]
]

["choose",
  [
    [[104, 3], [4, 4]],
    [[104, 3], [3, 4]],
    [[104, 5], [7, 7]],
    [[104, 7]]
  ]
]

["take-turn",
  [
    [[30, 3], [4, 4.01]],
    [[10, 3], [4, 4]],
    [[4, 5], [7, 7]],
    [[2, 7]]
  ]
]

["take-turn",
  [
    [[30, 3], [4, 4]],
    [[10, 3], [4, 4]],
    [[4, 5], [7, 7]],
    [[2, 7]]
  ]
]

["You must have rejected the previous one."]

Output:

true
[104, 5]
[101, 4]
[64, 3]
[44, 2]
[37, 5]
[26, 3]
[[104, 3], [4, 4]]

2657-7498-3

Input:

[
  "start-round",
  [
    [ 13, 2],
    [  2, 2],
    [ 44, 2],
    [ 64, 3],
    [ 37, 5],
    [  3, 3],
    [101, 4],
    [104, 5],
    [ 26, 3],
    [ 11, 5]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[104, 3], [4, 4]],
    [[104, 3], [4, 4]],
    [[104, 5], [7, 7]],
    [[104, 7]]
  ]
]

["choose",
  [
    [[104, 3], [4, 4]],
    [[104, 3], [3, 4]],
    [[104, 5], [7, 7]],
    [[104, 7]]
  ]
]

["take-turn",
  [
    [[30, 3], [4, 4]],
    [[10, 3], [4, 4]],
    [[4, 5], [7, 7]],
    [[2, 7]]
  ]
]

["take-turn",
  [
    [[30, 3], [4, 3]],
    [[10, 3], [4, 4]],
    [[4, 5], [7, 7]],
    [[2, 7]]
  ]
]

[
  "start-round",
  [
    [ 13, 2],
    [  2, 2],
    [ 44, 2],
    [ 64, 3],
    [ 37, 5],
    [  3, 3],
    [101, 4],
    [104, 5],
    [ 26, 3],
    [ 11, 5]
  ]
]

["Illegal. Round did not finish."]

Output:

true
[104, 5]
[101, 4]
[64, 3]
[44, 2]
[37, 5]
[26, 3]
[[104, 3], [4, 4]]
[13, 2]
[11, 5]
false

2657-7498-4

Input:

[
  "start-round",
  [
    [ 13, 2],
    [  2, 2],
    [ 44, 2],
    [ 64, 3],
    [ 37, 5],
    [  3, 3],
    [101, 4],
    [104, 5],
    [ 26, 3],
    [ 11, 5]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[104, 3], [4, 4]],
    [[104, 3], [4, 4]],
    [[104, 5], [7, 7]],
    [[104, 7]]
  ]
]

["choose",
  [
    [[104, 3], [4, 4]],
    [[104, 3], [3, 4]],
    [[104, 5], [7, 7]],
    [[104, 7]]
  ]
]

["take-turn",
  [
    [[30, 3], [4, 4]],
    [[10, 3], [4, 4]],
    [[4, 5], [7, 7]],
    [[2, 7]]
  ]
]

["take-turn",
  [
    [[30, 3], [4, 3]],
    [[10, 3], [4, 4]],
    [[4, 5], [105, 7]],
    [[2, 7]]
  ]
]

["Prev was illegal. Out of bounds face value."]

Output:

true
[104, 5]
[101, 4]
[64, 3]
[44, 2]
[37, 5]
[26, 3]
[[104, 3], [4, 4]]
[13, 2]

2657-7498-5

Input:

[
  "start-round",
  [
    [ 13, 2],
    [  2, 2],
    [ 44, 2],
    [ 64, 3],
    [ 37, 5],
    [  3, 3],
    [101, 4],
    [104, 5],
    [ 26, 3],
    [ 11, 5]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[3, 3], [4, 4]],
    [[3, 3], [4, 4]],
    [[5, 5], [7, 7]],
    [[2, 2]]
  ]
]

["take-turn",
  [
    [[104, 3], [4, 4]],
    [[104, 3], [4, 4]],
    [[104, 5], [7, 7]],
    [[104, 7]]
  ]
]

["choose",
  [
    [[104, 3], [4, 4]],
    [[104, 3], [3, 4]],
    [[104, 5], [7, 7]],
    [[104, 7]]
  ]
]

["take-turn",
  [
    [[30, 3], [4, 4]],
    [[10, 3], [4, 4]],
    [[4, 5], [7, 7]],
    [[2, 7]]
  ]
]

["choose",
  [
    [[100, 3], [4, 4]],
    [[100, 3], [4, 4]],
    [[100, 5], [7, 7]],
    [[100, 7]]
  ]
]

["choose",
  [
    [[100, 3], [4, 4]],
    [[100, 3], [4, 4]],
    [[100, 5], [7, 7]],
    [[100, 7]]
  ]
]

["Illegal double choose."]

Output:

true
[104, 5]
[101, 4]
[64, 3]
[44, 2]
[37, 5]
[26, 3]
[[104, 3], [4, 4]]
[13, 2]
[[100, 3], [4, 4]]
false

3461-8179-3

Input:

["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["start-round",[[1,2],[2,4],[4,3],[8,7],[16,3],[32,5],[55,7],[77,5],[99,5],[104,2]]]

Output:

false

3461-8179-4

Input:

["start-round",[[5,2],[7,4],[4,3],[8,7],[16,3],[32,5],[55,7],[77,5],[99,5],[104,2]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]
["take-turn",[[[3,7]],[[14,3]],[[15,3]],[[17,4]]]]

Output:

true
[104,2]
[99,5]
[77,5]
[55,7]
[32,5]
[16,3]
[8,7]
[7,4]
[5,2]
[4,3]
false

3461-8179-5

Input:

["start-round",[[1,2]]]
["choose",[[],[],[],[]]]

Output:


5223-6080-3

Input:

[
  "take-turn",
  [[[74, 2], [99, 3]], [[45, 5]], [[22, 6], [67, 4]], [[102, 2]]]
]

Output:

  false

6118-3959-3

Input:

["start-round", [["3", "4"], ["5", "4"], ["6", "3"], ["2", "4"]]]

Output:


7013-1976-4

Input:

[]

Output:


7469-3561-3

Input:


Output:


9159-5803-3

Input:

["start-round", "Not going to work"]

Output:


9159-5803-5

Input:

["start-round", [[32,4],[68,7],[49,4],[73,2],[51,5],[75,4],[29,4],[66,3],[42,5],[9,4]]]

["take-turn", [[[-69,5]],[[17,2]],[[33,7]],[[48,74]]]]

Output:

true