marking3/output
author Christian Urban <urbanc@in.tum.de>
Thu, 31 Oct 2019 09:20:32 +0000
changeset 293 f4f2227ac957
parent 258 ebe71908b13e
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
258
ebe71908b13e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
ebe71908b13e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
Below is the feedback and provisional marks for your submission
293
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
     3
for assignment 8 Part 1.  Please note all marks are provisional until
258
ebe71908b13e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
ratified by the assessment board -- this is not an official
ebe71908b13e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
results transcript.
ebe71908b13e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
293
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
     7
knight1.scala does not contain vars, returns, Arrays, ListBuffers etc?
258
ebe71908b13e updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
  --> success
293
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
     9
knight1.scala runs?
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    10
  --> success 
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    11
 is_legal(8, Nil, (3, 4)) == true 
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    12
 is_legal(8, List((4, 1), (1, 0)), (4, 1)) == false 
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    13
 is_legal(2, Nil, (0, 0)) == true
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    14
  --> test failed
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    15
 legal_moves(8, Nil, (2,2)) == List((3,4), (4,3), (4,1), (3,0), (1,0), (0,1), (0,3), (1,4))
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    16
 legal_moves(8, Nil, (7,7)) == List((6,5), (5,6))
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    17
 legal_moves(8, List((4,1), (1,0)), (2,2)) == List((3,4), (4,3), (3,0), (0,1), (0,3), (1,4))
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    18
 legal_moves(8, List((6,6)), (7,7)) == List((6,5), (5,6))
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    19
 legal_moves(1, Nil, (0,0)) == Nil
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    20
 legal_moves(2, Nil, (0,0)) == Nil
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    21
 legal_moves(3, Nil, (0,0)) == List((1,2), (2,1))
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    22
  --> test failed
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    23
 all_tours from every position on the board
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    24
 dim = 1: 1
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    25
       2: 0,0,0,0
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    26
       3: 0,0,0,0,0,0,0,0,0
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    27
       4: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    28
       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
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    29
  --> test failed
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    30
 enum_tours(5, List((0,2)) ) => 56 tours? and all correct?
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    31
  --> test failed
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    32
 val f = (x:(Int, Int)) => if (x._1 > 3) Some(List(x)) else None 
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    33
   first(List((1,0),(2,0),(3,0),(4,0)), f) == Some(List((4,0)))
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    34
   first(List((1,0),(2,0),(3,0)), f) == None
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    35
  --> test failed
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    36
 is first_tour(8, List((0, 0))) ok? 
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    37
 is first_tour(4, List((0, 0))) == None 
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    38
  --> test failed
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    39
Overall mark for Part 1
f4f2227ac957 updated
Christian Urban <urbanc@in.tum.de>
parents: 258
diff changeset
    40
0