<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=EightQueenProblem%2F%EA%B0%95%EC%84%9D%EC%B2%9C</id>
	<title>EightQueenProblem/강석천 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=EightQueenProblem%2F%EA%B0%95%EC%84%9D%EC%B2%9C"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=EightQueenProblem/%EA%B0%95%EC%84%9D%EC%B2%9C&amp;action=history"/>
	<updated>2026-05-15T05:44:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://mediawiki.zeropage.org/index.php?title=EightQueenProblem/%EA%B0%95%EC%84%9D%EC%B2%9C&amp;diff=84340&amp;oldid=prev</id>
		<title>Maintenance script: Repair batch-0002 pages from live compare</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=EightQueenProblem/%EA%B0%95%EC%84%9D%EC%B2%9C&amp;diff=84340&amp;oldid=prev"/>
		<updated>2026-03-27T00:16:02Z</updated>

		<summary type="html">&lt;p&gt;Repair batch-0002 pages from live compare&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:16, 27 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l95&quot;&gt;Line 95:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 95:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for i in range (0,8):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for i in range (0,8):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              for j in range (0,8):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              for j in range (0,8):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  self.boardArray&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;(i,j)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;] &lt;/del&gt;= 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  self.boardArray&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&lt;/ins&gt;(i,j)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#93; &lt;/ins&gt;= 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      def GetData (self, x, y):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      def GetData (self, x, y):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          return self.boardArray&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;(y,x)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          return self.boardArray&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&lt;/ins&gt;(y,x)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#93;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      def SetData (self, x, y, data):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      def SetData (self, x, y, data):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          self.boardArray&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;(y,x)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;] &lt;/del&gt;= data&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          self.boardArray&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&lt;/ins&gt;(y,x)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#93; &lt;/ins&gt;= data&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      def SetQueen (self, x, y):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      def SetQueen (self, x, y):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          self.boardArray&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;(y,x)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;] &lt;/del&gt;= 1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          self.boardArray&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&lt;/ins&gt;(y,x)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#93; &lt;/ins&gt;= 1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      def IsSelftyZone (self, x, y):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      def IsSelftyZone (self, x, y):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l197&quot;&gt;Line 197:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 197:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for position in PositionList:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for position in PositionList:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              self.SetQueen (position&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;0&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;, position&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;1&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              self.SetQueen (position&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&lt;/ins&gt;0&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#93;&lt;/ins&gt;, position&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&lt;/ins&gt;1&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#93;&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              Ret = self.DefineQueen (Level + 1)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              Ret = self.DefineQueen (Level + 1)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if not Ret:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if not Ret:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  self.SetData (position&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;0&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;,position&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;1&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;, 0)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                  self.SetData (position&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&lt;/ins&gt;0&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#93;&lt;/ins&gt;,position&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&lt;/ins&gt;1&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#93;&lt;/ins&gt;, 0)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      def GetUnAttackablePosition (self, Level):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      def GetUnAttackablePosition (self, Level):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          UnAttackablePositionList = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          UnAttackablePositionList = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;#91;&amp;amp;#93;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for i in range (0,8):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;          for i in range (0,8):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if not self.IsAttackableOthers (i, Level):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;              if not self.IsAttackableOthers (i, Level):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l216&quot;&gt;Line 216:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 216:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      bd = QueenBoard ()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      bd = QueenBoard ()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      bd.main ()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      bd.main ()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.zeropage.org/index.php?title=EightQueenProblem/%EA%B0%95%EC%84%9D%EC%B2%9C&amp;diff=31512&amp;oldid=prev</id>
		<title>imported&gt;Unknown at 05:23, 7 February 2021</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=EightQueenProblem/%EA%B0%95%EC%84%9D%EC%B2%9C&amp;diff=31512&amp;oldid=prev"/>
		<updated>2021-02-07T05:23:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== BoardTestCase.py ===&lt;br /&gt;
 import unittest&lt;br /&gt;
 from Board import *&lt;br /&gt;
 &lt;br /&gt;
 class BoardTestCase (unittest.TestCase):&lt;br /&gt;
     def setUp (self):&lt;br /&gt;
         self.bd = QueenBoard ()&lt;br /&gt;
 &lt;br /&gt;
     def tearDown (self):&lt;br /&gt;
         self.bd = None&lt;br /&gt;
         &lt;br /&gt;
     def testBoardEmpty (self):&lt;br /&gt;
         self.assertEquals (self.bd.GetData (2,2), 0)&lt;br /&gt;
 &lt;br /&gt;
     def testSetQueen (self):&lt;br /&gt;
         self.bd.SetQueen (2,2)&lt;br /&gt;
         self.assertEquals (self.bd.GetData (2,2) ,1)&lt;br /&gt;
 &lt;br /&gt;
     def testPrintBoard (self):&lt;br /&gt;
         self.bd.SetQueen (1,1)&lt;br /&gt;
         self.bd.SetQueen (2,2)&lt;br /&gt;
         self.bd.SetQueen (7,7)&lt;br /&gt;
         self.assertEquals (self.bd.PrintBoard (), &amp;#039;&amp;#039;&amp;#039;00000000\n01000000\n00100000\n00000000\n00000000\n00000000\n00000000\n00000001\n&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
         &lt;br /&gt;
     def testIsSelftyZone (self):&lt;br /&gt;
         self.bd.SetQueen (2,2)&lt;br /&gt;
         self.assertEquals (self.bd.IsSelftyZone (3,3), 0)&lt;br /&gt;
         self.assertEquals (self.bd.IsSelftyZone (1,5), 1)&lt;br /&gt;
 &lt;br /&gt;
     def testFindQueenInSameVertical (self):&lt;br /&gt;
         self.bd.SetQueen (2,2)&lt;br /&gt;
         self.assertEquals (self.bd.FindQueenInSameVertical (2), 1)&lt;br /&gt;
         self.assertEquals (self.bd.FindQueenInSameVertical (3), 0)&lt;br /&gt;
 &lt;br /&gt;
     def testFindQueenInSameHorizonal (self):&lt;br /&gt;
         self.bd.SetQueen (2,2)&lt;br /&gt;
         self.assertEquals (self.bd.FindQueenInSameHorizonal (2), 1)&lt;br /&gt;
         self.assertEquals (self.bd.FindQueenInSameHorizonal (3), 0)&lt;br /&gt;
 &lt;br /&gt;
     def testFindQueenInSameCrossLeftTopToRightBottom (self):&lt;br /&gt;
         self.bd.SetQueen (2,2)&lt;br /&gt;
         self.assertEquals (self.bd.FindQueenInSameCrossLeftTopToRightBottom (3,3), 1)&lt;br /&gt;
         self.assertEquals (self.bd.FindQueenInSameCrossLeftTopToRightBottom (1,1), 1)&lt;br /&gt;
         self.assertEquals (self.bd.FindQueenInSameCrossLeftTopToRightBottom (4,1), 0)&lt;br /&gt;
 &lt;br /&gt;
     def testFindQueenInSameCrossLeftBottomToRightTop (self):&lt;br /&gt;
         self.bd.SetQueen (2,2)&lt;br /&gt;
         self.assertEquals (self.bd.FindQueenInSameCrossLeftBottomToRightTop (3,3), 0)&lt;br /&gt;
         self.assertEquals (self.bd.FindQueenInSameCrossLeftBottomToRightTop (3,1), 1)&lt;br /&gt;
         self.assertEquals (self.bd.FindQueenInSameCrossLeftBottomToRightTop (1,3), 1)&lt;br /&gt;
 &lt;br /&gt;
     def testGetFirstCornerInCrossLeftTopToRightBottom (self):&lt;br /&gt;
         self.assertEquals (self.bd.GetFirstCornerInCrossLeftTopToRightBottom (3,3), (0,0))&lt;br /&gt;
         self.assertEquals (self.bd.GetFirstCornerInCrossLeftTopToRightBottom (4,3), (1,0))&lt;br /&gt;
         self.assertEquals (self.bd.GetFirstCornerInCrossLeftTopToRightBottom (1,5), (0,4))&lt;br /&gt;
         self.assertEquals (self.bd.GetFirstCornerInCrossLeftTopToRightBottom (0,0), (0,0))&lt;br /&gt;
 &lt;br /&gt;
     def testGetFirstCornerInCrossLeftBottomToRightTop (self):&lt;br /&gt;
         self.assertEquals (self.bd.GetFirstCornerInCrossLeftBottomToRightTop (2,2), (0,4))&lt;br /&gt;
         self.assertEquals (self.bd.GetFirstCornerInCrossLeftBottomToRightTop (3,5), (1,7))&lt;br /&gt;
         self.assertEquals (self.bd.GetFirstCornerInCrossLeftBottomToRightTop (7,7), (7,7))&lt;br /&gt;
 &lt;br /&gt;
     def testIsAttackableOthers (self):&lt;br /&gt;
         self.bd.SetQueen (2,2)&lt;br /&gt;
         self.assertEquals (self.bd.IsAttackableOthers (3,3),1)&lt;br /&gt;
         self.bd.SetQueen (7,1)&lt;br /&gt;
         self.assertEquals (self.bd.IsAttackableOthers (7,1),0)&lt;br /&gt;
         self.assertEquals (self.bd.IsAttackableOthers (4,4),1)&lt;br /&gt;
 &lt;br /&gt;
     def testEightQueen (self):&lt;br /&gt;
         ## self.bd.EightQueen ()&lt;br /&gt;
         ## if all queen pass the function &amp;#039;IsAttackableOthers&amp;#039;&lt;br /&gt;
         self.bd.EightQueen ()&lt;br /&gt;
 &lt;br /&gt;
     def testGetUnAttackablePositon (self):&lt;br /&gt;
         self.bd.SetQueen (0,0)&lt;br /&gt;
         self.assertEquals (self.bd.GetUnAttackablePosition (1), ((2,1),(3,1),(4,1),(5,1),(6,1),(7,1)))&lt;br /&gt;
         self.assertEquals (self.bd.GetUnAttackablePosition (2), ((1,2),(3,2),(4,2),(5,2),(6,2),(7,2)))&lt;br /&gt;
 &lt;br /&gt;
 suite = unittest.makeSuite (BoardTestCase, &amp;quot;test&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 runner = unittest.TextTestRunner ()&lt;br /&gt;
 runner.run (suite)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Board.py ===&lt;br /&gt;
 class QueenBoard:&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         self.boardArray = {}&lt;br /&gt;
         self.Empty ()&lt;br /&gt;
         self.Flag = 0&lt;br /&gt;
         self.Count = 0&lt;br /&gt;
 &lt;br /&gt;
     def Empty (self):&lt;br /&gt;
         for i in range (0,8):&lt;br /&gt;
             for j in range (0,8):&lt;br /&gt;
                 self.boardArray[(i,j)] = 0&lt;br /&gt;
 &lt;br /&gt;
     def GetData (self, x, y):&lt;br /&gt;
         return self.boardArray[(y,x)]&lt;br /&gt;
 &lt;br /&gt;
     def SetData (self, x, y, data):&lt;br /&gt;
         self.boardArray[(y,x)] = data&lt;br /&gt;
 &lt;br /&gt;
     def SetQueen (self, x, y):&lt;br /&gt;
         self.boardArray[(y,x)] = 1&lt;br /&gt;
 &lt;br /&gt;
     def IsSelftyZone (self, x, y):&lt;br /&gt;
         # x, y position. check vertical, horizonal, two cross check.&lt;br /&gt;
         if self.FindQueenInSameVertical (x):&lt;br /&gt;
             return 0&lt;br /&gt;
         elif self.FindQueenInSameHorizonal (y):&lt;br /&gt;
             return 0&lt;br /&gt;
         elif self.FindQueenInSameCrossLeftTopToRightBottom (x,y):&lt;br /&gt;
             return 0&lt;br /&gt;
         elif self.FindQueenInSameCrossLeftBottomToRightTop (x,y):&lt;br /&gt;
             return 0&lt;br /&gt;
         else:&lt;br /&gt;
             return 1&lt;br /&gt;
 &lt;br /&gt;
     def FindQueenInSameVertical (self, x):&lt;br /&gt;
         for i in range (0,8):&lt;br /&gt;
             if self.GetData (x,i) == 1:&lt;br /&gt;
                 return 1&lt;br /&gt;
         return 0&lt;br /&gt;
         &lt;br /&gt;
 &lt;br /&gt;
     def FindQueenInSameHorizonal (self, y):&lt;br /&gt;
         for i in range (0,8):&lt;br /&gt;
             if self.GetData (i,y) == 1:&lt;br /&gt;
                 return 1&lt;br /&gt;
         return 0&lt;br /&gt;
 &lt;br /&gt;
     def FindQueenInSameCrossLeftTopToRightBottom (self, x,y):&lt;br /&gt;
         FirstCornerX, FirstCornerY = self.GetFirstCornerInCrossLeftTopToRightBottom (x,y)&lt;br /&gt;
         FindRange = 8 - max (FirstCornerX, FirstCornerY)&lt;br /&gt;
         for i in range (0,FindRange):&lt;br /&gt;
             if self.GetData (FirstCornerX + i, FirstCornerY + i) == 1:&lt;br /&gt;
                 return 1&lt;br /&gt;
 &lt;br /&gt;
         return 0&lt;br /&gt;
 &lt;br /&gt;
     def FindQueenInSameCrossLeftBottomToRightTop (self, x,y):&lt;br /&gt;
         FirstCornerX, FirstCornerY = self.GetFirstCornerInCrossLeftBottomToRightTop (x,y)&lt;br /&gt;
         FindRange = FirstCornerY + 1 - FirstCornerX;&lt;br /&gt;
 &lt;br /&gt;
         for i in range (0,FindRange):&lt;br /&gt;
             if self.GetData (FirstCornerX + i, FirstCornerY - i) == 1:&lt;br /&gt;
                 return 1&lt;br /&gt;
             &lt;br /&gt;
         return 0&lt;br /&gt;
         &lt;br /&gt;
 &lt;br /&gt;
     def GetFirstCornerInCrossLeftTopToRightBottom (self, x,y):&lt;br /&gt;
         CornerX = x - min (x,y)&lt;br /&gt;
         CornerY = y - min (x,y)&lt;br /&gt;
         return (CornerX, CornerY)&lt;br /&gt;
 &lt;br /&gt;
     def GetFirstCornerInCrossLeftBottomToRightTop (self, x,y):&lt;br /&gt;
         CornerX = x - min (x,abs(y-7))&lt;br /&gt;
         CornerY = y + min (x,abs(y-7))&lt;br /&gt;
         return (CornerX, CornerY)&lt;br /&gt;
 &lt;br /&gt;
     def PrintBoard (self):&lt;br /&gt;
         lines = &amp;#039;&amp;#039;&lt;br /&gt;
         for i in range (0,8):&lt;br /&gt;
             line = &amp;#039;&amp;#039;&lt;br /&gt;
             for j in range (0,8):&lt;br /&gt;
                 line += &amp;quot;%d&amp;quot; % self.GetData (j,i)&lt;br /&gt;
             lines += &amp;quot;%s\n&amp;quot; % line&lt;br /&gt;
 &lt;br /&gt;
         return lines&lt;br /&gt;
 &lt;br /&gt;
     def IsAttackableOthers (self, x,y):&lt;br /&gt;
         TempData = self.GetData (x,y)&lt;br /&gt;
         self.SetData (x,y,0)&lt;br /&gt;
         if self.IsSelftyZone (x,y):&lt;br /&gt;
             Ret = 0&lt;br /&gt;
         else:&lt;br /&gt;
             Ret = 1&lt;br /&gt;
         self.SetData (x,y,TempData)&lt;br /&gt;
 &lt;br /&gt;
         return Ret&lt;br /&gt;
 &lt;br /&gt;
     def EightQueen (self):&lt;br /&gt;
         self.Flag = 0&lt;br /&gt;
         self.DefineQueen (0)&lt;br /&gt;
 &lt;br /&gt;
     def DefineQueen (self, Level):&lt;br /&gt;
         if Level == 8:&lt;br /&gt;
             self.Count = self.Count + 1&lt;br /&gt;
             print &amp;quot;%d. level : %d \n&amp;quot; % (self.Count, Level)&lt;br /&gt;
             print self.PrintBoard ()&lt;br /&gt;
             return 0&lt;br /&gt;
         &lt;br /&gt;
         PositionList = self.GetUnAttackablePosition (Level)&lt;br /&gt;
 &lt;br /&gt;
         for position in PositionList:&lt;br /&gt;
             self.SetQueen (position[0], position[1])&lt;br /&gt;
             Ret = self.DefineQueen (Level + 1)&lt;br /&gt;
             if not Ret:&lt;br /&gt;
                 self.SetData (position[0],position[1], 0)&lt;br /&gt;
 &lt;br /&gt;
     def GetUnAttackablePosition (self, Level):&lt;br /&gt;
         UnAttackablePositionList = []&lt;br /&gt;
         for i in range (0,8):&lt;br /&gt;
             if not self.IsAttackableOthers (i, Level):&lt;br /&gt;
                 UnAttackablePositionList.append ((i,Level))&lt;br /&gt;
 &lt;br /&gt;
         return tuple(UnAttackablePositionList)&lt;br /&gt;
 &lt;br /&gt;
     def main (self):&lt;br /&gt;
         self.EightQueen ()&lt;br /&gt;
         &lt;br /&gt;
 if __name__ == &amp;#039;__main__&amp;#039;:&lt;br /&gt;
     bd = QueenBoard ()&lt;br /&gt;
     bd.main ()&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>imported&gt;Unknown</name></author>
	</entry>
</feed>