main_testing4/knight_test2.scala
changeset 403 312c9eb39ad8
parent 347 0b727d1a8184
equal deleted inserted replaced
402:72e43cb53c13 403:312c9eb39ad8
     1 
     1 
     2 import CW9a._
     2 import M4a._
     3 
     3 
     4 assert(legal_moves(8, Nil, (2,2)) == List((3,4), (4,3), (4,1), (3,0), (1,0), (0,1), (0,3), (1,4)))
     4 assert(legal_moves(8, Nil, (2,2)) == List((3,4), (4,3), (4,1), (3,0), (1,0), (0,1), (0,3), (1,4)))
     5 assert(legal_moves(8, Nil, (7,7)) == List((6,5), (5,6)))
     5 assert(legal_moves(8, Nil, (7,7)) == List((6,5), (5,6)))
     6 assert(legal_moves(8, List((4,1), (1,0)), (2,2)) == List((3,4), (4,3), (3,0), (0,1), (0,3), (1,4)))
     6 assert(legal_moves(8, List((4,1), (1,0)), (2,2)) == List((3,4), (4,3), (3,0), (0,1), (0,3), (1,4)))
     7 assert(legal_moves(8, List((6,6)), (7,7)) == List((6,5), (5,6)))
     7 assert(legal_moves(8, List((6,6)), (7,7)) == List((6,5), (5,6)))