<?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=TFP%EC%98%88%EC%A0%9C%2FOmok</id>
	<title>TFP예제/Omok - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=TFP%EC%98%88%EC%A0%9C%2FOmok"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=TFP%EC%98%88%EC%A0%9C/Omok&amp;action=history"/>
	<updated>2026-05-15T03:29:55Z</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=TFP%EC%98%88%EC%A0%9C/Omok&amp;diff=85013&amp;oldid=prev</id>
		<title>Maintenance script: Repair batch-0003 pages from live compare</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=TFP%EC%98%88%EC%A0%9C/Omok&amp;diff=85013&amp;oldid=prev"/>
		<updated>2026-03-27T00:29:11Z</updated>

		<summary type="html">&lt;p&gt;Repair batch-0003 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:29, 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-l217&quot;&gt;Line 217:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 217:&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,19):&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,19):&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,19):&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,19):&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;= 9&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;= 9&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 GetDol (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 GetDol (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 SetDol (self,x,y,dol):&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 SetDol (self,x,y,dol):&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;= dol&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;= dol&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 IsExistDolInPosition (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 IsExistDolInPosition (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-l235&quot;&gt;Line 235:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 235:&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,19):&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,19):&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,19):&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,19):&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;                  dol = &amp;quot;%s&amp;quot; % 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;&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;                  dol = &amp;quot;%s&amp;quot; % 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;&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 dol == &amp;#039;9&amp;#039;:&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 dol == &amp;#039;9&amp;#039;:&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;                      dol = &amp;#039;+&amp;#039;&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;                      dol = &amp;#039;+&amp;#039;&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-l351&quot;&gt;Line 351:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 351:&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;          Position = raw_input (&amp;quot;Input Dol Position x,y :&amp;quot;)&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;          Position = raw_input (&amp;quot;Input Dol Position x,y :&amp;quot;)&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;          Position = string.split (Position, &amp;quot;,&amp;quot;)&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;          Position = string.split (Position, &amp;quot;,&amp;quot;)&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;          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;= (int)(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;)&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;          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;= (int)(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;)&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;          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;= (int)(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;          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;= (int)(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;          return Position&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;          return Position&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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l379&quot;&gt;Line 379:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 379:&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;[[TestFirstProgramming]]&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;[[TestFirstProgramming]]&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=TFP%EC%98%88%EC%A0%9C/Omok&amp;diff=39591&amp;oldid=prev</id>
		<title>imported&gt;Unknown at 05:28, 7 February 2021</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=TFP%EC%98%88%EC%A0%9C/Omok&amp;diff=39591&amp;oldid=prev"/>
		<updated>2021-02-07T05:28:10Z</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;__TOC__&lt;br /&gt;
=== TestCaseBoard.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.dolboard = Board ()&lt;br /&gt;
         self.dolboard.Empty ()&lt;br /&gt;
 &lt;br /&gt;
     def tearDown (self):&lt;br /&gt;
         self.dolboard = None&lt;br /&gt;
         &lt;br /&gt;
     def testBoardEmpty (self):&lt;br /&gt;
         self.dolboard.Empty ()&lt;br /&gt;
         for i in range (0,19):&lt;br /&gt;
             for j in range (0,19):&lt;br /&gt;
                 self.assertEquals (self.dolboard.GetDol(i,j) , DolEmpty)&lt;br /&gt;
 &lt;br /&gt;
     def testIsExistDolInPosition (self):&lt;br /&gt;
         self.dolboard.SetDol (1,1,DolWhite)&lt;br /&gt;
         self.assertEquals (self.dolboard.IsExistDolInPosition(1,1),1)&lt;br /&gt;
         self.assertEquals (self.dolboard.IsExistDolInPosition(3,6),0)&lt;br /&gt;
         &lt;br /&gt;
     def testDol (self):&lt;br /&gt;
         self.dolboard.SetDol (1,1,DolWhite)&lt;br /&gt;
         self.assertEquals (self.dolboard.GetDol(1,1), DolWhite)&lt;br /&gt;
         self.dolboard.SetDol (2,2,DolBlack)&lt;br /&gt;
         self.assertEquals (self.dolboard.GetDol(2,2), DolBlack)&lt;br /&gt;
         self.assertEquals (self.dolboard.GetDol(18,18), DolEmpty)&lt;br /&gt;
         self.assertEquals (self.dolboard.GetDol(6,6), DolEmpty)&lt;br /&gt;
 &lt;br /&gt;
         self.dolboard.SetDol (18,18,DolBlack)&lt;br /&gt;
         self.assertEquals (self.dolboard.GetDol(18,18), DolBlack)&lt;br /&gt;
 &lt;br /&gt;
     def testPrintEmptyBoard (self):&lt;br /&gt;
         self.dolboard.Empty ()&lt;br /&gt;
         self.assertEquals (self.dolboard.Print(), &amp;#039;&amp;#039;&amp;#039;+++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 +++++++++++++++++++&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;)&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;
=== TestCaseOmok.py ===&lt;br /&gt;
 import unittest&lt;br /&gt;
 from Omok import *&lt;br /&gt;
 &lt;br /&gt;
 class OmokTestCase (unittest.TestCase):&lt;br /&gt;
     def setUp (self):&lt;br /&gt;
         self.omok = Omok ()&lt;br /&gt;
         self.omok.Start ()&lt;br /&gt;
 &lt;br /&gt;
     def tearDown (self):&lt;br /&gt;
         self.omok = None&lt;br /&gt;
 &lt;br /&gt;
     def testIsExistDolInPosition (self):&lt;br /&gt;
         self.omok.PutDol (2,2)&lt;br /&gt;
         self.assertEquals (self.omok.IsExistDolInPosition (2,2),1)&lt;br /&gt;
         self.omok.PutDol (0,0)&lt;br /&gt;
         self.assertEquals (self.omok.IsExistDolInPosition (0,0),1)&lt;br /&gt;
         self.assertEquals (self.omok.IsExistDolInPosition (16,16),0)&lt;br /&gt;
 &lt;br /&gt;
     def testChangeCurrentDol (self):&lt;br /&gt;
         currentDol = self.omok.GetCurrentDol ()&lt;br /&gt;
         self.omok.ChangeCurrentDol ()&lt;br /&gt;
         self.assertNotEqual (currentDol, self.omok.GetCurrentDol ())&lt;br /&gt;
             &lt;br /&gt;
     def testFirstDolIsBlackInStart (self):&lt;br /&gt;
         self.omok.Start ()&lt;br /&gt;
         self.assertEquals (self.omok.GetCurrentDol (), DolBlack)         &lt;br /&gt;
 &lt;br /&gt;
     def testPutDol (self):&lt;br /&gt;
         self.omok.PutDol (3,4)&lt;br /&gt;
         self.assertEquals (self.omok.GetDol (3,4), DolBlack)&lt;br /&gt;
 &lt;br /&gt;
     def testCurrentDol (self):&lt;br /&gt;
         self.omok.PutDol (3,4)&lt;br /&gt;
         self.assertEquals (self.omok.GetCurrentDol(), DolBlack)&lt;br /&gt;
         self.omok.PutDol (9,6)&lt;br /&gt;
         self.assertEquals (self.omok.GetCurrentDol(), DolBlack)&lt;br /&gt;
 &lt;br /&gt;
     def testCheckFiveLeftTopToRightBottom (self):&lt;br /&gt;
         self.omok.PutDol (0,0)      # black&lt;br /&gt;
         self.omok.PutDol (1,1)      # black&lt;br /&gt;
         self.omok.PutDol (2,2)      # black&lt;br /&gt;
         self.omok.PutDol (3,3)      # black&lt;br /&gt;
         self.omok.PutDol (4,4)      # black&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveLeftTopToRightBottom (4,4),1)&lt;br /&gt;
 &lt;br /&gt;
         self.omok.Start ()&lt;br /&gt;
         self.omok.PutDol (18,18)      # black&lt;br /&gt;
         self.omok.PutDol (17,17)      # black&lt;br /&gt;
         self.omok.PutDol (16,16)      # black&lt;br /&gt;
         self.omok.PutDol (15,15)      # black&lt;br /&gt;
         self.omok.PutDol (14,14)      # black&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveLeftTopToRightBottom (14,14),1)&lt;br /&gt;
 &lt;br /&gt;
         self.omok.Start ()&lt;br /&gt;
         self.omok.SetCurrentDol (DolWhite)&lt;br /&gt;
         self.omok.PutDol (5,4)      # white&lt;br /&gt;
         self.omok.PutDol (6,5)      # white&lt;br /&gt;
         self.omok.PutDol (7,6)      # white&lt;br /&gt;
         self.omok.PutDol (8,7)      # white&lt;br /&gt;
         self.omok.PutDol (9,8)      # white&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveLeftTopToRightBottom (9,8),1)&lt;br /&gt;
 &lt;br /&gt;
     def testCheckFiveLeftBottomToRightTop (self):&lt;br /&gt;
         self.omok.PutDol (0,5)      # black&lt;br /&gt;
         self.omok.PutDol (1,4)      # black&lt;br /&gt;
         self.omok.PutDol (2,3)      # black&lt;br /&gt;
         self.omok.PutDol (3,2)      # black&lt;br /&gt;
         self.omok.PutDol (4,1)      # black&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveLeftBottomToRightTop (4,1),1)&lt;br /&gt;
 &lt;br /&gt;
         self.omok.Start ()&lt;br /&gt;
         self.omok.PutDol (18,14)      # black&lt;br /&gt;
         self.omok.PutDol (17,15)      # black&lt;br /&gt;
         self.omok.PutDol (16,16)      # black&lt;br /&gt;
         self.omok.PutDol (15,17)      # black&lt;br /&gt;
         self.omok.PutDol (14,18)      # black&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveLeftBottomToRightTop (14,18),1)&lt;br /&gt;
 &lt;br /&gt;
         self.omok.Start ()&lt;br /&gt;
         self.omok.SetCurrentDol (DolWhite)&lt;br /&gt;
         self.omok.PutDol (5,8)      # white&lt;br /&gt;
         self.omok.PutDol (6,7)      # white&lt;br /&gt;
         self.omok.PutDol (7,6)      # white&lt;br /&gt;
         self.omok.PutDol (8,5)      # white&lt;br /&gt;
         self.omok.PutDol (9,4)      # white&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveLeftBottomToRightTop (9,4),1)&lt;br /&gt;
 &lt;br /&gt;
     def testCheckFiveHorizon (self):&lt;br /&gt;
         self.omok.PutDol (0,0)&lt;br /&gt;
         self.omok.PutDol (1,0)&lt;br /&gt;
         self.omok.PutDol (2,0)&lt;br /&gt;
         self.omok.PutDol (3,0)&lt;br /&gt;
         self.omok.PutDol (4,0)&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveHorizon (4,0), 1)&lt;br /&gt;
 &lt;br /&gt;
         self.omok.Start ()&lt;br /&gt;
         self.omok.PutDol (18,0)&lt;br /&gt;
         self.omok.PutDol (17,0)&lt;br /&gt;
         self.omok.PutDol (16,0)&lt;br /&gt;
         self.omok.PutDol (15,0)&lt;br /&gt;
         self.omok.PutDol (14,0)&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveHorizon (14,0), 1)&lt;br /&gt;
 &lt;br /&gt;
         self.omok.Start ()&lt;br /&gt;
         self.omok.PutDol (5,3) &lt;br /&gt;
         self.omok.PutDol (6,3) &lt;br /&gt;
         self.omok.PutDol (7,3) &lt;br /&gt;
         self.omok.PutDol (8,3)&lt;br /&gt;
         self.omok.PutDol (9,3)&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveHorizon (9,3), 1)&lt;br /&gt;
 &lt;br /&gt;
     def testCheckFiveVertical (self):&lt;br /&gt;
         self.omok.PutDol (0,0)&lt;br /&gt;
         self.omok.PutDol (0,1)&lt;br /&gt;
         self.omok.PutDol (0,2)&lt;br /&gt;
         self.omok.PutDol (0,3)&lt;br /&gt;
         self.omok.PutDol (0,4)&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveVertical (0,4), 1)&lt;br /&gt;
 &lt;br /&gt;
         self.omok.Start ()&lt;br /&gt;
         self.omok.PutDol (0,18)&lt;br /&gt;
         self.omok.PutDol (0,17)&lt;br /&gt;
         self.omok.PutDol (0,16)&lt;br /&gt;
         self.omok.PutDol (0,15)&lt;br /&gt;
         self.omok.PutDol (0,14)&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveVertical (0,14), 1)&lt;br /&gt;
 &lt;br /&gt;
         self.omok.Start ()&lt;br /&gt;
         self.omok.PutDol (3,5)&lt;br /&gt;
         self.omok.PutDol (3,6)&lt;br /&gt;
         self.omok.PutDol (3,7)&lt;br /&gt;
         self.omok.PutDol (3,8)&lt;br /&gt;
         self.omok.PutDol (3,9)&lt;br /&gt;
         self.assertEquals (self.omok.CheckFiveVertical (3,9), 1)&lt;br /&gt;
 &lt;br /&gt;
 suite = unittest.makeSuite (OmokTestCase, &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;
=== Board.py ===&lt;br /&gt;
 import sys&lt;br /&gt;
 &lt;br /&gt;
 DolEmpty = 9&lt;br /&gt;
 DolBlack = 0&lt;br /&gt;
 DolWhite = 1&lt;br /&gt;
 &lt;br /&gt;
 class Board:&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         self.boardArray = {}&lt;br /&gt;
 &lt;br /&gt;
     def Empty(self):&lt;br /&gt;
         for i in range (0,19):&lt;br /&gt;
             for j in range (0,19):&lt;br /&gt;
                 self.boardArray[(i,j)] = 9&lt;br /&gt;
 &lt;br /&gt;
     def GetDol (self,x,y):&lt;br /&gt;
         return self.boardArray[(y,x)]&lt;br /&gt;
 &lt;br /&gt;
     def SetDol (self,x,y,dol):&lt;br /&gt;
         self.boardArray[(y,x)] = dol&lt;br /&gt;
 &lt;br /&gt;
     def IsExistDolInPosition (self,x,y):&lt;br /&gt;
         if self.GetDol (x,y) != DolEmpty:&lt;br /&gt;
             return 1&lt;br /&gt;
         else:&lt;br /&gt;
             return 0&lt;br /&gt;
 &lt;br /&gt;
     def Print (self):&lt;br /&gt;
         PrintString = &amp;#039;&amp;#039;&lt;br /&gt;
         for i in range (0,19):&lt;br /&gt;
             for j in range (0,19):&lt;br /&gt;
                 dol = &amp;quot;%s&amp;quot; % self.boardArray[(i,j)]&lt;br /&gt;
                 if dol == &amp;#039;9&amp;#039;:&lt;br /&gt;
                     dol = &amp;#039;+&amp;#039;&lt;br /&gt;
                 PrintString += dol&lt;br /&gt;
             PrintString += &amp;quot;\n&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         return PrintString&lt;br /&gt;
&lt;br /&gt;
=== Omok.py ===&lt;br /&gt;
 from Board import *&lt;br /&gt;
 import string&lt;br /&gt;
 &lt;br /&gt;
 class Omok:&lt;br /&gt;
     def __init__(self):&lt;br /&gt;
         self.currentDol = DolEmpty&lt;br /&gt;
         self.board = Board ()&lt;br /&gt;
         self.currentWinner = DolEmpty&lt;br /&gt;
         pass&lt;br /&gt;
 &lt;br /&gt;
     def Start (self):&lt;br /&gt;
         self.currentDol = DolBlack&lt;br /&gt;
         self.board.Empty ()&lt;br /&gt;
         pass&lt;br /&gt;
 &lt;br /&gt;
     def GetCurrentDol (self):&lt;br /&gt;
         return self.currentDol&lt;br /&gt;
 &lt;br /&gt;
     def SetCurrentDol (self, dol):&lt;br /&gt;
         self.currentDol = dol    &lt;br /&gt;
     &lt;br /&gt;
     def ChangeCurrentDol (self):&lt;br /&gt;
         if self.currentDol == DolBlack:&lt;br /&gt;
             self.SetCurrentDol (DolWhite)&lt;br /&gt;
         elif self.currentDol == DolWhite:&lt;br /&gt;
             self.SetCurrentDol (DolBlack)&lt;br /&gt;
 &lt;br /&gt;
     def CheckFiveHorizon (self,x,y):&lt;br /&gt;
         for i in range (max(0,x-4),min (19,x+5)):&lt;br /&gt;
             CountSameDol = 0&lt;br /&gt;
             for j in range (i,min(19,i+5)):&lt;br /&gt;
                 if self.board.GetDol (j,y) == self.currentDol:&lt;br /&gt;
                     CountSameDol += 1&lt;br /&gt;
                     if CountSameDol == 5:&lt;br /&gt;
                         return 1&lt;br /&gt;
         return 0&lt;br /&gt;
 &lt;br /&gt;
     def CheckFiveLeftTopToRightBottom (self,x,y):&lt;br /&gt;
         # Left-top -&amp;amp;gt; Right-Bottom&lt;br /&gt;
         #   \&lt;br /&gt;
         #    \&lt;br /&gt;
         #     &amp;amp;gt;&lt;br /&gt;
         for i in range (-4,5):&lt;br /&gt;
             CountSameDol = 0&lt;br /&gt;
             for j in range (i,i+5):&lt;br /&gt;
                 if x + j &amp;amp;lt; 0 or x + j &amp;amp;gt; 18:&lt;br /&gt;
                     continue&lt;br /&gt;
                 elif y + j &amp;amp;lt; 0 or y + j &amp;amp;gt; 18:&lt;br /&gt;
                     continue&lt;br /&gt;
                 else:&lt;br /&gt;
                     if self.board.GetDol (x+j,y+j) == self.currentDol:&lt;br /&gt;
                         CountSameDol += 1&lt;br /&gt;
                         if CountSameDol == 5:&lt;br /&gt;
                             return 1&lt;br /&gt;
         return 0&lt;br /&gt;
 &lt;br /&gt;
     def CheckFiveLeftBottomToRightTop (self,x,y):&lt;br /&gt;
         # Left-Bottom -&amp;amp;gt; Right-Top&lt;br /&gt;
         #    &amp;amp;gt;&lt;br /&gt;
         #   /&lt;br /&gt;
         #  /&lt;br /&gt;
         for i in range (-4,5):&lt;br /&gt;
             CountSameDol = 0&lt;br /&gt;
             for j in range (i,i+5):&lt;br /&gt;
                 if x + j &amp;amp;lt; 0 or x + j &amp;amp;gt; 18:&lt;br /&gt;
                     continue&lt;br /&gt;
                 elif y - j &amp;amp;lt; 0 or y - j &amp;amp;gt; 18:&lt;br /&gt;
                     continue&lt;br /&gt;
                 else:&lt;br /&gt;
                     if self.board.GetDol (x+j,y-j) == self.currentDol:&lt;br /&gt;
                         CountSameDol += 1&lt;br /&gt;
                         if CountSameDol == 5:&lt;br /&gt;
                             return 1&lt;br /&gt;
         return 0&lt;br /&gt;
            &lt;br /&gt;
 &lt;br /&gt;
     def CheckFiveVertical (self,x,y):&lt;br /&gt;
         for i in range (max(0,y-4),min (19,y+5)):&lt;br /&gt;
             CountSameDol = 0&lt;br /&gt;
             for j in range (i,min(19,i+5)):&lt;br /&gt;
                 if self.board.GetDol (x,j) == self.currentDol:&lt;br /&gt;
                     CountSameDol += 1&lt;br /&gt;
                     if CountSameDol == 5:&lt;br /&gt;
                         return 1&lt;br /&gt;
         return 0       &lt;br /&gt;
         &lt;br /&gt;
 &lt;br /&gt;
     def PutDol (self,x,y):&lt;br /&gt;
         self.board.SetDol (x,y,self.currentDol)&lt;br /&gt;
 &lt;br /&gt;
     def GetDol (self,x,y):&lt;br /&gt;
         return self.board.GetDol (x,y)&lt;br /&gt;
 &lt;br /&gt;
     def CheckForFive (self,x,y):&lt;br /&gt;
         if self.CheckFiveHorizon (x,y) == 1:&lt;br /&gt;
             self.currentWinner = self.currentDol&lt;br /&gt;
         if self.CheckFiveVertical (x,y) == 1:&lt;br /&gt;
             self.currentWinner = self.currentDol&lt;br /&gt;
         if self.CheckFiveLeftTopToRightBottom (x,y) == 1:&lt;br /&gt;
             self.currentWinner = self.currentDol&lt;br /&gt;
 &lt;br /&gt;
     def CurrentWinner (self):&lt;br /&gt;
         return self.currentWinner&lt;br /&gt;
         &lt;br /&gt;
     def QuestionDolPosition (self):&lt;br /&gt;
         Position = raw_input (&amp;quot;Input Dol Position x,y :&amp;quot;)&lt;br /&gt;
         Position = string.split (Position, &amp;quot;,&amp;quot;)&lt;br /&gt;
         Position[0] = (int)(Position[0])&lt;br /&gt;
         Position[1] = (int)(Position[1])&lt;br /&gt;
         return Position&lt;br /&gt;
 &lt;br /&gt;
     def IsExistDolInPosition (self,x,y):&lt;br /&gt;
         return self.board.IsExistDolInPosition (x,y)&lt;br /&gt;
             &lt;br /&gt;
     def main (self):&lt;br /&gt;
         self.Start ()&lt;br /&gt;
         while self.CurrentWinner() == DolEmpty:&lt;br /&gt;
             print self.board.Print ()&lt;br /&gt;
             Position = self.QuestionDolPosition ()&lt;br /&gt;
             x,y = Position&lt;br /&gt;
 &lt;br /&gt;
             if not self.IsExistDolInPosition (x,y):&lt;br /&gt;
                 self.PutDol (x,y)&lt;br /&gt;
                 self.CheckForFive (x,y)&lt;br /&gt;
                 self.ChangeCurrentDol ()&lt;br /&gt;
 &lt;br /&gt;
         print &amp;quot;Current Winner : %s&amp;quot; % self.CurrentWinner ()&lt;br /&gt;
 &lt;br /&gt;
 if __name__ == &amp;#039;__main__&amp;#039;:&lt;br /&gt;
     omok = Omok ()&lt;br /&gt;
     omok.main ()&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[TestFirstProgramming]]&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>imported&gt;Unknown</name></author>
	</entry>
</feed>