- EightQueenProblem/강석천 . . . . 5 matches
def testIsSelftyZone (self):
self.assertEquals (self.bd.IsSelftyZone (3,3), 0)
self.assertEquals (self.bd.IsSelftyZone (1,5), 1)
def IsSelftyZone (self, x, y):
if self.IsSelftyZone (x,y):
- EightQueenProblemDiscussion . . . . 4 matches
그 다음에는 '퀸을 놓을 수 있는 위치가 안전한 곳일까?' 하는 점에 대해 접근. 이를 SelftyZone 이라 칭했다. 이를 체크하기 위해서는 가로/세로/대각선방향을 모두 체크해야 하므로 다시 4개의 작은 모듈로 나누어졌다. 그중 대각선 체크의 경우 처음 비교를 시작할 위치를 측정하기 위한 모듈을 하나 더 추출하게 되었다.
def testIsSelftyZone (self):
self.assertEquals (self.bd.IsSelftyZone (3,3), 0)
self.assertEquals (self.bd.IsSelftyZone (1,5), 1)
Found 2 matching pages out of 7555 total pages (5000 pages are searched)
You can also click here to search title.