Below is the feedback and provisional marks for your submission
for assignment 8 Part 1. Please note all marks are provisional until
ratified by the assessment board -- this is not an official
results transcript.
knight1.scala does not contain vars, returns, Arrays, ListBuffers etc?
--> success
knight1.scala runs?
--> success
is_legal(8, Nil, (3, 4)) == true
is_legal(8, List((4, 1), (1, 0)), (4, 1)) == false
is_legal(2, Nil, (0, 0)) == true
--> test failed
legal_moves(8, Nil, (2,2)) == List((3,4), (4,3), (4,1), (3,0), (1,0), (0,1), (0,3), (1,4))
legal_moves(8, Nil, (7,7)) == List((6,5), (5,6))
legal_moves(8, List((4,1), (1,0)), (2,2)) == List((3,4), (4,3), (3,0), (0,1), (0,3), (1,4))
legal_moves(8, List((6,6)), (7,7)) == List((6,5), (5,6))
legal_moves(1, Nil, (0,0)) == Nil
legal_moves(2, Nil, (0,0)) == Nil
legal_moves(3, Nil, (0,0)) == List((1,2), (2,1))
--> test failed
all_tours from every position on the board
dim = 1: 1
2: 0,0,0,0
3: 0,0,0,0,0,0,0,0,0
4: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
5: 304,0,56,0,304,0,56,0,56,0,56,0,64,0,56,0,56,0,56,0,304,0,56,0,304
--> test failed
enum_tours(5, List((0,2)) ) => 56 tours? and all correct?
--> test failed
val f = (x:(Int, Int)) => if (x._1 > 3) Some(List(x)) else None
first(List((1,0),(2,0),(3,0),(4,0)), f) == Some(List((4,0)))
first(List((1,0),(2,0),(3,0)), f) == None
--> test failed
is first_tour(8, List((0, 0))) ok?
is first_tour(4, List((0, 0))) == None
--> test failed
Overall mark for Part 1
0