testing3/knight_test2.scala
changeset 284 fc20e5f83f0e
parent 218 ae788eeea8a0
equal deleted inserted replaced
283:3102d61edf45 284:fc20e5f83f0e
       
     1 
       
     2 import CW8a._
     1 
     3 
     2 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)))
     3 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)))
     4 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)))
     5 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)))