--- a/marking3/output Wed Oct 30 21:56:46 2019 +0000
+++ b/marking3/output Thu Oct 31 09:20:32 2019 +0000
@@ -1,27 +1,40 @@
Below is the feedback and provisional marks for your submission
-for assignment 8 Advanced Part 2. Please note all marks are provisional until
+for assignment 8 Part 1. Please note all marks are provisional until
ratified by the assessment board -- this is not an official
results transcript.
-knight2.scala does not contain vars, returns, Arrays, ListBuffers etc?
- --> success
-knight2.scala runs?
- --> success
- ordered_moves(8, List((3,4), (3,2)), (1,3)) == List((0,1), (0,5), (2,1), (2,5))
- ordered_moves(8, List((4,0)), (0,0)) == List((2,1), (1,2))
- ordered_moves(8, List((0,4)), (0,0)) == List((1,2), (2,1))
- --> success
- first_closed_tour_heuristic(6, List((3,3))) found and correct?
+knight1.scala does not contain vars, returns, Arrays, ListBuffers etc?
--> success
- first_tour_heuristic(8, List((0,0))) found and correct?
- first_tour_heuristic(40, List((0,0))) found and correct?
- --> success
-knight3.scala does not contain vars, returns, Arrays, ListBuffers etc?
- --> success
-knight3.scala runs?
- --> success
- tour_on_mega_board(70, List((0,0))) found and correct?
- --> success
-Overall mark for CW 8, Part 2
-4
+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