<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.visual-prolog.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Victor+Yukhtenko</id>
	<title>wiki.visual-prolog.com - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.visual-prolog.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Victor+Yukhtenko"/>
	<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Special:Contributions/Victor_Yukhtenko"/>
	<updated>2026-04-09T10:21:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:SpbCopyright&amp;diff=2616</id>
		<title>Template:SpbCopyright</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:SpbCopyright&amp;diff=2616"/>
		<updated>2011-05-23T13:43:09Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;color:black; background-color:#ffffcc; font-style:italic; align:center&amp;quot;&amp;gt;Written by Victor Yukhtenko. Email: victor@pdc.spb.su&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_14&amp;diff=2615</id>
		<title>Tutorial Project. Release 14</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_14&amp;diff=2615"/>
		<updated>2011-05-22T09:54:18Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= The demonstration of practices of the advanced Vip-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The communication of the main application with parts of the application, which are placed to the special kind of DLL (Dynamically Linked Library) - PzlContainers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Notes:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*PzlContainers contains PzlComponents. Both PzlContainers and PzlComponents fit the agreements of the Pzl Technology (VpPuzzle Technology).&lt;br /&gt;
*The detailed description of the VpPuZzle technology can be seen at [http://wiki.visual-prolog.com/index.php?title=Category:VpPuZzle|Pzl technology description].&lt;br /&gt;
|code=&lt;br /&gt;
*The Release 14 contains the set of projects, which demonstrates the different phases of the transformation of the application Polyline Release 13 to the Pzl-based application.&lt;br /&gt;
*The set of projects contains:&lt;br /&gt;
**The Project MonoApplicaion\Polyline.prj6 shows how classes are converted to pzl-Components. Here the wrapping approach been used.&lt;br /&gt;
**The Project MonoApplicaionLib\Polyline.prj6 is the same project as MonoApplicaion\Polyline.prj6, but HumanInterface and model Computer3 represented as the libraries.&lt;br /&gt;
**The directory pzlBasedApplication contains again the set of projects - the main application Polyline.prj6 and the set of projects, corresponding to containers (see version dependant details in the file VersionReference.html):&lt;br /&gt;
***Containers\Competitors\Competitors.prj6&lt;br /&gt;
***Containers\PolylineBlackHorsePlayers\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
***Containers\PolylineGame\PolylineGame.prj6&lt;br /&gt;
***Containers\PolylineGameStatistics\PolylineGameStatistics.prj6&lt;br /&gt;
***Containers\PolylineHumanInterface\PolylineHumanInterface.prj6&lt;br /&gt;
***Containers\PolylineJuniourJudge\PolylineJuniourJudge.prj6&lt;br /&gt;
***Containers\PolylinePublicPlayers\PolylinePublicPlayers.prj6&lt;br /&gt;
***Containers\PolylineSeniourJudge\PolylineSeniourJudge.prj6&lt;br /&gt;
|functionality=&lt;br /&gt;
No changes.&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline14\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build project Programs\MonoApplicaion\Polyline.prj6&lt;br /&gt;
&lt;br /&gt;
Run command files &lt;br /&gt;
*Programs\BuildComputer3Lib.cmd&lt;br /&gt;
*Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Programs\MonoApplicaionLib\Polyline.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Polyline.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\Competitors\Competitors.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineBlackHorsePlayers\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineBlackHorsePlayersLib\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineGame\PolylineGame.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineGameStatistics\PolylineGameStatistics.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineHumanInterface\PolylineHumanInterface.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineHumanInterfaceLib\PolylineHumanInterface.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineJuniourJudge\PolylineJuniourJudge.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylinePublicPlayers\PolylinePublicPlayers.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineSeniourJudge\PolylineSeniourJudge.prj6&lt;br /&gt;
Run command file Programs\pzlBasedApplication\RegisterComponents.cmd&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
*The executable applications correspond to projects: Programs\MonoApplicaion\Polyline.prj6 or Programs\MonoApplicaionLib\Polyline.prj6, where all components are in one application;&lt;br /&gt;
*The project Programs\pzlBasedApplication\Polyline.prj6, which communicates with components placed to pzl-Containers and registered in the PzlRegistry.pzr file. The file PzlRegistry.pzr must be in the same directory as the executable file&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 13]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:PolylineInstall&amp;diff=2614</id>
		<title>Template:PolylineInstall</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:PolylineInstall&amp;diff=2614"/>
		<updated>2011-05-21T09:35:26Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To get the full set of projects of the series of the Polyline projects, please download archives using links at [http://discuss.visual-prolog.com/viewtopic.php?t=8771 PDC forum]:&lt;br /&gt;
&lt;br /&gt;
*VipSpbSDK_PE_73_Examples_Polyline_1_14.zip&lt;br /&gt;
*VipSpbSDK_PE_73_Tools_Polyline_1_14.zip]&lt;br /&gt;
&lt;br /&gt;
to any convenient directory. The directory named VipSpbSDK will be created automatically.&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2613</id>
		<title>Tutorial Project Evolutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2613"/>
		<updated>2011-05-21T09:30:22Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
==Motivation==&lt;br /&gt;
This is an example of the evolution of the project development beginning from the initial idea till the today status. A very easy game has been chosen as the basic idea. We do not know the initial name of this game so we call it Polyline.&lt;br /&gt;
&lt;br /&gt;
Each development step represented as the release, so you can see step by step the evolution of the application. Each release expands the functionality of the application, moving along the way the code is extended, modified and restructured or only restructured and modified. &lt;br /&gt;
&lt;br /&gt;
Looking carefully on the code of each release you can see technique of the using of the Visual Prolog and advanced tools. It can be used to study the Visual Prolog features. &lt;br /&gt;
&lt;br /&gt;
[[PolyLine Game Rules|Game Rules ...]]&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
The set of tutorial projects Polyline is the part of the VipSpbSDK. VipSpbSDK - is the set of tools to develop applications based on Visual Prolog from Prolog Development Center A/S &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{{PolylineInstall}}&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To build and study projects of series you must install [http://www.visual-prolog.com|Visual Prolog programming system]&lt;br /&gt;
&lt;br /&gt;
The reference information regarding the features depending on the vesrion of the Visual Prolog and version of the VipSpb SDK please see in the [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]].&lt;br /&gt;
Short information regarding each release may be found in the table below.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!SRC&lt;br /&gt;
!Release&lt;br /&gt;
!Short Description&lt;br /&gt;
!User Interface&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=14&lt;br /&gt;
|description=[[Tutorial Project. Release 14|The demonstration of the use of the pzl-Technology (DLL-based agreements)]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=13&lt;br /&gt;
|description=[[Tutorial Project. Release 13|The demonstration of various ways of the interaction with components placed to DLLs]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=12&lt;br /&gt;
|description=[[Tutorial Project. Release 12|Projects family with UI - ObjectConsole, Windows. The game dimension problem solved]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=11&lt;br /&gt;
|description=[[Tutorial Project. Release 11|Projects family with different kinds of UI - Console, ObjectConsole, Windows. The usage of Libraries. New Player added.]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=10&lt;br /&gt;
|description=[[Tutorial Project. Release 10|Code modified. Communication with players based on events. &amp;#039;&amp;#039;NotificationAgency pack&amp;#039;&amp;#039; used.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=9&lt;br /&gt;
|description=[[Tutorial Project. Release 9|Code modified. Each class generates the Object.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=8&lt;br /&gt;
|description=[[Tutorial Project. Release 8|Code modified. The structure of the project reorganized. Each class placed to the separate package.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=7&lt;br /&gt;
|description=[[Tutorial Project. Release 7|MultiLanguage feature. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=6&lt;br /&gt;
|description=[[Tutorial Project. Release 6|Multiple plays mode. Easy expansion of the list of players. The size of the field mutable. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=5&lt;br /&gt;
|description=[[Tutorial Project. Release 5|Computer&amp;#039;s move based on the prognosis on the depth &amp;#039;&amp;#039;K&amp;#039;&amp;#039; moves. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=4&lt;br /&gt;
|description=[[Tutorial Project. Release 4|Safe computer&amp;#039;s move - random. The code of the player-computer restructured.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=3&lt;br /&gt;
|description=[[Tutorial Project. Release 3|N players. The type of the player (computer or human) - by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=2&lt;br /&gt;
|description=[[Tutorial Project. Release 2|Players - objects. The initial move of the computer - random.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=1&lt;br /&gt;
|description=[[Tutorial Project. Release 1|Players: computer and human. The initial move by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Building notes==&lt;br /&gt;
{{SpbTestedWithEn}}&lt;br /&gt;
&lt;br /&gt;
Releases 1-7 projects may be easily created by copying the code directly from the wiki pages.&lt;br /&gt;
Since Release 8 you need to download the set of projects.&lt;br /&gt;
&lt;br /&gt;
Releases 1-9 projects may be built one by one without any tricks.&lt;br /&gt;
&lt;br /&gt;
Since Release 10 all projects use SpbSolutions IDE variable, which must refer to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
Since Release 11 some projects demonstrate building libraries, thus user must have Microsoft lib.exe program tool (see details in the release appropriate Readme.html file). &lt;br /&gt;
&lt;br /&gt;
Some Projects since Release 13 demonstrate and use the DLL creation. So these projects must be built using VIP CE only (please see details in [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]]).&lt;br /&gt;
&lt;br /&gt;
Projects placed to the Release 14 (Polyline14) PzlBasedApplication folder need to run the registration procedure after building all projects placed to the Containers directory. This must be done using the Programs\pzlBasedApplication\RegisterComponents.cmd command file.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Учебный Проект]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:PolylineBuildCMD&amp;diff=2611</id>
		<title>Template:PolylineBuildCMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:PolylineBuildCMD&amp;diff=2611"/>
		<updated>2011-04-13T10:59:03Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To build projects the IDE variable SpbSolutions must be set to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
===The complex building===&lt;br /&gt;
To simplify the settings and initial building of applicaions the Build.cmd command file included (BuildPersonal.cmd - please see details in &amp;#039;&amp;#039;&amp;#039;[[Polyline Version Reference]]&amp;#039;&amp;#039;&amp;#039; or in &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\VersionReference.html&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The use of Build.cmd file:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*sets the SpbSolutions IDE variable, which refers to the VipSpb SDK directory;&lt;br /&gt;
*&amp;quot;knows&amp;quot; where Visual Prolog is installed and uses VipBuilder.exe; &lt;br /&gt;
*builds all projects containing in the subfolders;&lt;br /&gt;
*builds all needed libraries;&lt;br /&gt;
*registers all pzl-Components (if needed);&lt;br /&gt;
*informs regarding the result of each building operation; &lt;br /&gt;
*Build.cmd file may be used together with the Visual Prolog CE only (please see details in &amp;#039;&amp;#039;&amp;#039;[[Polyline Version Reference]]&amp;#039;&amp;#039;&amp;#039; or in &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\VersionReference.html&amp;#039;&amp;#039;&amp;#039;).&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:PolylineTemplateEn&amp;diff=2610</id>
		<title>Template:PolylineTemplateEn</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:PolylineTemplateEn&amp;diff=2610"/>
		<updated>2011-04-13T10:51:17Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
&lt;br /&gt;
The programs listed below are part of the [[Tutorial Project Evolutions]] article.&lt;br /&gt;
&lt;br /&gt;
[[PolyLine Game Rules|Game Rules ...]]&lt;br /&gt;
==Goal==&lt;br /&gt;
{{{goal}}}&lt;br /&gt;
{{{goalContent}}}&lt;br /&gt;
==Functionality==&lt;br /&gt;
{{{functionality}}}&lt;br /&gt;
==Code==&lt;br /&gt;
*{{SpbTestedWithEn}}&lt;br /&gt;
&lt;br /&gt;
{{{code}}}&lt;br /&gt;
&lt;br /&gt;
==Install==&lt;br /&gt;
{{{install}}}&lt;br /&gt;
&lt;br /&gt;
{{{open}}}&lt;br /&gt;
==Run==&lt;br /&gt;
{{{run}}}&lt;br /&gt;
&lt;br /&gt;
{{{rusver}}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2609</id>
		<title>Tutorial Project Evolutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2609"/>
		<updated>2011-04-12T18:49:40Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: /* Motivation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
==Motivation==&lt;br /&gt;
This is an example of the evolution of the project development beginning from the initial idea till the today status. A very easy game has been chosen as the basic idea. We do not know the initial name of this game so we call it Polyline.&lt;br /&gt;
&lt;br /&gt;
Each development step represented as the release, so you can see step by step the evolution of the application. Each release expands the functionality of the application, moving along the way the code is extended, modified and restructured or only restructured and modified. &lt;br /&gt;
&lt;br /&gt;
Looking carefully on the code of each release you can see technique of the using of the Visual Prolog and advanced tools. It can be used to study the Visual Prolog features. &lt;br /&gt;
&lt;br /&gt;
[[PolyLine Game Rules|Game Rules ...]]&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
The set of tutorial projects Polyline is the part of the VipSpbSDK. VipSpbSDK - is the set of tools to develop applications based on Visual Prolog from Prolog Development Center A/S &lt;br /&gt;
To build and study projects of series you must install [http://www.visual-prolog.com|Visual Prolog programming system]&lt;br /&gt;
&lt;br /&gt;
The reference information regarding the features depending on the vesrion of the Visual Prolog and version of the VipSpb SDK please see in the [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]].&lt;br /&gt;
Short information regarding each release may be found in the table below.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!SRC&lt;br /&gt;
!Release&lt;br /&gt;
!Short Description&lt;br /&gt;
!User Interface&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=14&lt;br /&gt;
|description=[[Tutorial Project. Release 14|The demonstration of the use of the pzl-Technology (DLL-based agreements)]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=13&lt;br /&gt;
|description=[[Tutorial Project. Release 13|The demonstration of various ways of the interaction with components placed to DLLs]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=12&lt;br /&gt;
|description=[[Tutorial Project. Release 12|Projects family with UI - ObjectConsole, Windows. The game dimension problem solved]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=11&lt;br /&gt;
|description=[[Tutorial Project. Release 11|Projects family with different kinds of UI - Console, ObjectConsole, Windows. The usage of Libraries. New Player added.]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=10&lt;br /&gt;
|description=[[Tutorial Project. Release 10|Code modified. Communication with players based on events. &amp;#039;&amp;#039;NotificationAgency pack&amp;#039;&amp;#039; used.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=9&lt;br /&gt;
|description=[[Tutorial Project. Release 9|Code modified. Each class generates the Object.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=8&lt;br /&gt;
|description=[[Tutorial Project. Release 8|Code modified. The structure of the project reorganized. Each class placed to the separate package.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=7&lt;br /&gt;
|description=[[Tutorial Project. Release 7|MultiLanguage feature. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=6&lt;br /&gt;
|description=[[Tutorial Project. Release 6|Multiple plays mode. Easy expansion of the list of players. The size of the field mutable. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=5&lt;br /&gt;
|description=[[Tutorial Project. Release 5|Computer&amp;#039;s move based on the prognosis on the depth &amp;#039;&amp;#039;K&amp;#039;&amp;#039; moves. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=4&lt;br /&gt;
|description=[[Tutorial Project. Release 4|Safe computer&amp;#039;s move - random. The code of the player-computer restructured.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=3&lt;br /&gt;
|description=[[Tutorial Project. Release 3|N players. The type of the player (computer or human) - by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=2&lt;br /&gt;
|description=[[Tutorial Project. Release 2|Players - objects. The initial move of the computer - random.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=1&lt;br /&gt;
|description=[[Tutorial Project. Release 1|Players: computer and human. The initial move by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Building notes==&lt;br /&gt;
{{SpbTestedWithEn}}&lt;br /&gt;
&lt;br /&gt;
Releases 1-7 projects may be easily created by copying the code directly from the wiki pages.&lt;br /&gt;
Since Release 8 you need to download the set of projects.&lt;br /&gt;
&lt;br /&gt;
Releases 1-9 projects may be built one by one without any tricks.&lt;br /&gt;
&lt;br /&gt;
Since Release 10 all projects use SpbSolutions IDE variable, which must refer to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
Since Release 11 some projects demonstrate building libraries, thus user must have Microsoft lib.exe program tool (see details in the release appropriate Readme.html file). &lt;br /&gt;
&lt;br /&gt;
Some Projects since Release 13 demonstrate and use the DLL creation. So these projects must be built using VIP CE only (please see details in [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]]).&lt;br /&gt;
&lt;br /&gt;
Projects placed to the Release 14 (Polyline14) PzlBasedApplication folder need to run the registration procedure after building all projects placed to the Containers directory. This must be done using the Programs\pzlBasedApplication\RegisterComponents.cmd command file.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Учебный Проект]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2608</id>
		<title>Tutorial Project Evolutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2608"/>
		<updated>2011-04-12T18:48:46Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: /* Before you start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
==Motivation==&lt;br /&gt;
This is an example of the evolution of the project development beginning from the initial idea till the today status. A very easy game has been chosen as the basic idea. We do not know the initial name of this game so we call it Polyline.&lt;br /&gt;
&lt;br /&gt;
Each development step represented as the release, so you can see step by step the evolution of the application. Each release expands the functionality of the application, moving along the way the code is extended, modified and restructured or only restructured and modified. &lt;br /&gt;
&lt;br /&gt;
Looking carefully on the code of each release you can see technique of the using of the Visual Prolog and advanced tools. It can be used to study the Visual Prolog features. &lt;br /&gt;
&lt;br /&gt;
{{PolyLine Game Rules}}&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
The set of tutorial projects Polyline is the part of the VipSpbSDK. VipSpbSDK - is the set of tools to develop applications based on Visual Prolog from Prolog Development Center A/S &lt;br /&gt;
To build and study projects of series you must install [http://www.visual-prolog.com|Visual Prolog programming system]&lt;br /&gt;
&lt;br /&gt;
The reference information regarding the features depending on the vesrion of the Visual Prolog and version of the VipSpb SDK please see in the [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]].&lt;br /&gt;
Short information regarding each release may be found in the table below.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!SRC&lt;br /&gt;
!Release&lt;br /&gt;
!Short Description&lt;br /&gt;
!User Interface&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=14&lt;br /&gt;
|description=[[Tutorial Project. Release 14|The demonstration of the use of the pzl-Technology (DLL-based agreements)]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=13&lt;br /&gt;
|description=[[Tutorial Project. Release 13|The demonstration of various ways of the interaction with components placed to DLLs]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=12&lt;br /&gt;
|description=[[Tutorial Project. Release 12|Projects family with UI - ObjectConsole, Windows. The game dimension problem solved]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=11&lt;br /&gt;
|description=[[Tutorial Project. Release 11|Projects family with different kinds of UI - Console, ObjectConsole, Windows. The usage of Libraries. New Player added.]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=10&lt;br /&gt;
|description=[[Tutorial Project. Release 10|Code modified. Communication with players based on events. &amp;#039;&amp;#039;NotificationAgency pack&amp;#039;&amp;#039; used.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=9&lt;br /&gt;
|description=[[Tutorial Project. Release 9|Code modified. Each class generates the Object.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=8&lt;br /&gt;
|description=[[Tutorial Project. Release 8|Code modified. The structure of the project reorganized. Each class placed to the separate package.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=7&lt;br /&gt;
|description=[[Tutorial Project. Release 7|MultiLanguage feature. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=6&lt;br /&gt;
|description=[[Tutorial Project. Release 6|Multiple plays mode. Easy expansion of the list of players. The size of the field mutable. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=5&lt;br /&gt;
|description=[[Tutorial Project. Release 5|Computer&amp;#039;s move based on the prognosis on the depth &amp;#039;&amp;#039;K&amp;#039;&amp;#039; moves. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=4&lt;br /&gt;
|description=[[Tutorial Project. Release 4|Safe computer&amp;#039;s move - random. The code of the player-computer restructured.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=3&lt;br /&gt;
|description=[[Tutorial Project. Release 3|N players. The type of the player (computer or human) - by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=2&lt;br /&gt;
|description=[[Tutorial Project. Release 2|Players - objects. The initial move of the computer - random.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=1&lt;br /&gt;
|description=[[Tutorial Project. Release 1|Players: computer and human. The initial move by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Building notes==&lt;br /&gt;
{{SpbTestedWithEn}}&lt;br /&gt;
&lt;br /&gt;
Releases 1-7 projects may be easily created by copying the code directly from the wiki pages.&lt;br /&gt;
Since Release 8 you need to download the set of projects.&lt;br /&gt;
&lt;br /&gt;
Releases 1-9 projects may be built one by one without any tricks.&lt;br /&gt;
&lt;br /&gt;
Since Release 10 all projects use SpbSolutions IDE variable, which must refer to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
Since Release 11 some projects demonstrate building libraries, thus user must have Microsoft lib.exe program tool (see details in the release appropriate Readme.html file). &lt;br /&gt;
&lt;br /&gt;
Some Projects since Release 13 demonstrate and use the DLL creation. So these projects must be built using VIP CE only (please see details in [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]]).&lt;br /&gt;
&lt;br /&gt;
Projects placed to the Release 14 (Polyline14) PzlBasedApplication folder need to run the registration procedure after building all projects placed to the Containers directory. This must be done using the Programs\pzlBasedApplication\RegisterComponents.cmd command file.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Учебный Проект]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2607</id>
		<title>Tutorial Project Evolutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2607"/>
		<updated>2011-04-12T18:42:01Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: /* Before you start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
==Motivation==&lt;br /&gt;
This is an example of the evolution of the project development beginning from the initial idea till the today status. A very easy game has been chosen as the basic idea. We do not know the initial name of this game so we call it Polyline.&lt;br /&gt;
&lt;br /&gt;
Each development step represented as the release, so you can see step by step the evolution of the application. Each release expands the functionality of the application, moving along the way the code is extended, modified and restructured or only restructured and modified. &lt;br /&gt;
&lt;br /&gt;
Looking carefully on the code of each release you can see technique of the using of the Visual Prolog and advanced tools. It can be used to study the Visual Prolog features. &lt;br /&gt;
&lt;br /&gt;
{{PolyLine Game Rules}}&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
VipSpbSDK_PE_73_Examples_Polyline is part of the VipSpbSDK. VipSpbSDK - is the set of tools to develop applications based on Visual Prolog from Prolog Development Center A/S &lt;br /&gt;
To build and study projects of series you must install [http://www.visual-prolog.com|Visual Prolog programming system]&lt;br /&gt;
&lt;br /&gt;
The reference information regarding the features depending on the vesrion of the Visual Prolog and version of the VipSpb SDK please see in the [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]].&lt;br /&gt;
Short information regarding each release may be found in the table below.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!SRC&lt;br /&gt;
!Release&lt;br /&gt;
!Short Description&lt;br /&gt;
!User Interface&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=14&lt;br /&gt;
|description=[[Tutorial Project. Release 14|The demonstration of the use of the pzl-Technology (DLL-based agreements)]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=13&lt;br /&gt;
|description=[[Tutorial Project. Release 13|The demonstration of various ways of the interaction with components placed to DLLs]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=12&lt;br /&gt;
|description=[[Tutorial Project. Release 12|Projects family with UI - ObjectConsole, Windows. The game dimension problem solved]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=11&lt;br /&gt;
|description=[[Tutorial Project. Release 11|Projects family with different kinds of UI - Console, ObjectConsole, Windows. The usage of Libraries. New Player added.]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=10&lt;br /&gt;
|description=[[Tutorial Project. Release 10|Code modified. Communication with players based on events. &amp;#039;&amp;#039;NotificationAgency pack&amp;#039;&amp;#039; used.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=9&lt;br /&gt;
|description=[[Tutorial Project. Release 9|Code modified. Each class generates the Object.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=8&lt;br /&gt;
|description=[[Tutorial Project. Release 8|Code modified. The structure of the project reorganized. Each class placed to the separate package.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=7&lt;br /&gt;
|description=[[Tutorial Project. Release 7|MultiLanguage feature. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=6&lt;br /&gt;
|description=[[Tutorial Project. Release 6|Multiple plays mode. Easy expansion of the list of players. The size of the field mutable. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=5&lt;br /&gt;
|description=[[Tutorial Project. Release 5|Computer&amp;#039;s move based on the prognosis on the depth &amp;#039;&amp;#039;K&amp;#039;&amp;#039; moves. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=4&lt;br /&gt;
|description=[[Tutorial Project. Release 4|Safe computer&amp;#039;s move - random. The code of the player-computer restructured.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=3&lt;br /&gt;
|description=[[Tutorial Project. Release 3|N players. The type of the player (computer or human) - by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=2&lt;br /&gt;
|description=[[Tutorial Project. Release 2|Players - objects. The initial move of the computer - random.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=1&lt;br /&gt;
|description=[[Tutorial Project. Release 1|Players: computer and human. The initial move by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Building notes==&lt;br /&gt;
{{SpbTestedWithEn}}&lt;br /&gt;
&lt;br /&gt;
Releases 1-7 projects may be easily created by copying the code directly from the wiki pages.&lt;br /&gt;
Since Release 8 you need to download the set of projects.&lt;br /&gt;
&lt;br /&gt;
Releases 1-9 projects may be built one by one without any tricks.&lt;br /&gt;
&lt;br /&gt;
Since Release 10 all projects use SpbSolutions IDE variable, which must refer to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
Since Release 11 some projects demonstrate building libraries, thus user must have Microsoft lib.exe program tool (see details in the release appropriate Readme.html file). &lt;br /&gt;
&lt;br /&gt;
Some Projects since Release 13 demonstrate and use the DLL creation. So these projects must be built using VIP CE only (please see details in [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]]).&lt;br /&gt;
&lt;br /&gt;
Projects placed to the Release 14 (Polyline14) PzlBasedApplication folder need to run the registration procedure after building all projects placed to the Containers directory. This must be done using the Programs\pzlBasedApplication\RegisterComponents.cmd command file.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Учебный Проект]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2606</id>
		<title>Tutorial Project Evolutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2606"/>
		<updated>2011-04-12T18:40:12Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
==Motivation==&lt;br /&gt;
This is an example of the evolution of the project development beginning from the initial idea till the today status. A very easy game has been chosen as the basic idea. We do not know the initial name of this game so we call it Polyline.&lt;br /&gt;
&lt;br /&gt;
Each development step represented as the release, so you can see step by step the evolution of the application. Each release expands the functionality of the application, moving along the way the code is extended, modified and restructured or only restructured and modified. &lt;br /&gt;
&lt;br /&gt;
Looking carefully on the code of each release you can see technique of the using of the Visual Prolog and advanced tools. It can be used to study the Visual Prolog features. &lt;br /&gt;
&lt;br /&gt;
{{PolyLine Game Rules}}&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
VipSpbSDK_PE_73_Examples_Polyline is part of the VipSpbSDK. VipSpbSDK - is the set of tools to develop applications based on Visual Prolog from Prolog Development Center A/S &lt;br /&gt;
To build and study projects of series you must install [[http://www.visual-prolog.com|Visual Prolog programming system]]&lt;br /&gt;
&lt;br /&gt;
The reference information regarding the features depending on the vesrion of the Visual Prolog and version of the VipSpb SDK please see in the [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]].&lt;br /&gt;
Short information regarding each release may be found in the table below.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!SRC&lt;br /&gt;
!Release&lt;br /&gt;
!Short Description&lt;br /&gt;
!User Interface&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=14&lt;br /&gt;
|description=[[Tutorial Project. Release 14|The demonstration of the use of the pzl-Technology (DLL-based agreements)]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=13&lt;br /&gt;
|description=[[Tutorial Project. Release 13|The demonstration of various ways of the interaction with components placed to DLLs]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=12&lt;br /&gt;
|description=[[Tutorial Project. Release 12|Projects family with UI - ObjectConsole, Windows. The game dimension problem solved]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=11&lt;br /&gt;
|description=[[Tutorial Project. Release 11|Projects family with different kinds of UI - Console, ObjectConsole, Windows. The usage of Libraries. New Player added.]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=10&lt;br /&gt;
|description=[[Tutorial Project. Releases 10|Code modified. Communication with players based on events. &amp;#039;&amp;#039;NotificationAgency pack&amp;#039;&amp;#039; used.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=9&lt;br /&gt;
|description=[[Tutorial Project. Releases 9|Code modified. Each class generates the Object.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=8&lt;br /&gt;
|description=[[Tutorial Project. Releases 8|Code modified. The structure of the project reorganized. Each class placed to the separate package.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=7&lt;br /&gt;
|description=[[Tutorial Project. Release 7|MultiLanguage feature. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=6&lt;br /&gt;
|description=[[Tutorial Project. Release 6|Multiple plays mode. Easy expansion of the list of players. The size of the field mutable. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=5&lt;br /&gt;
|description=[[Tutorial Project. Release 5|Computer&amp;#039;s move based on the prognosis on the depth &amp;#039;&amp;#039;K&amp;#039;&amp;#039; moves. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=4&lt;br /&gt;
|description=[[Tutorial Project. Release 4|Safe computer&amp;#039;s move - random. The code of the player-computer restructured.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=3&lt;br /&gt;
|description=[[Tutorial Project. Release 3|N players. The type of the player (computer or human) - by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=2&lt;br /&gt;
|description=[[Tutorial Project. Release 2|Players - objects. The initial move of the computer - random.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=1&lt;br /&gt;
|description=[[Tutorial Project. Release 1|Players: computer and human. The initial move by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
==Building notes==&lt;br /&gt;
{{SpbTestedWithEn}}&lt;br /&gt;
&lt;br /&gt;
Releases 1-7 projects may be easily created by copying the code directly from the wiki pages.&lt;br /&gt;
Since Release 8 you need to download the set of projects.&lt;br /&gt;
&lt;br /&gt;
Releases 1-9 projects may be built one by one without any tricks.&lt;br /&gt;
&lt;br /&gt;
Since Release 10 all projects use SpbSolutions IDE variable, which must refer to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
Since Release 11 some projects demonstrate building libraries, thus user must have Microsoft lib.exe program tool (see details in the release appropriate Readme.html file). &lt;br /&gt;
&lt;br /&gt;
Some Projects since Release 13 demonstrate and use the DLL creation. So these projects must be built using VIP CE only (please see details in [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]]).&lt;br /&gt;
&lt;br /&gt;
Projects placed to the Release 14 (Polyline14) PzlBasedApplication folder need to run the registration procedure after building all projects placed to the Containers directory. This must be done using the Programs\pzlBasedApplication\RegisterComponents.cmd command file.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Учебный Проект]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2605</id>
		<title>Tutorial Project Evolutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2605"/>
		<updated>2011-04-12T18:31:42Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: /* Building notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
==Motivation==&lt;br /&gt;
This is an example of the evolution of the project development beginning from the initial idea till the today status. A very easy game has been chosen as the basic idea. We do not know the initial name of this game so we call it Polyline.&lt;br /&gt;
&lt;br /&gt;
Each development step represented as the release, so you can see step by step the evolution of the application. Each release expands the functionality of the application, moving along the way the code is extended, modified and restructured or only restructured and modified. &lt;br /&gt;
&lt;br /&gt;
Looking carefully on the code of each release you can see technique of the using of the Visual Prolog and advanced tools. It can be used to study the Visual Prolog features. &lt;br /&gt;
&lt;br /&gt;
{{PolyLine Game Rules}}&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
VipSpbSDK_PE_73_Examples_Polyline is part of the VipSpbSDK. VipSpbSDK - is the set of tools to develop applications based on Visual Prolog from Prolog Development Center A/S &lt;br /&gt;
To build and study projects of series you must install [http://www.visual-prolog.com|Visual Prolog programming system]&lt;br /&gt;
&lt;br /&gt;
The reference information regarding the features depending on the vesrion of the Visual Prolog and version of the VipSpb SDK please see in the [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]].&lt;br /&gt;
Short information regarding each release may be found in the table below.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!SRC&lt;br /&gt;
!Release&lt;br /&gt;
!Short Description&lt;br /&gt;
!User Interface&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=14&lt;br /&gt;
|description=[[Tutorial Project. Release 14|The demonstration of the use of the pzl-Technology (DLL-based agreements)]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=13&lt;br /&gt;
|description=[[Tutorial Project. Release 13|The demonstration of various ways of the interaction with components placed to DLLs]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=12&lt;br /&gt;
|description=[[Tutorial Project. Release 12|Projects family with UI - ObjectConsole, Windows. The game dimension problem solved]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=11&lt;br /&gt;
|description=[[Tutorial Project. Release 11|Projects family with different kinds of UI - Console, ObjectConsole, Windows. The usage of Libraries. New Player added.]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=10&lt;br /&gt;
|description=[[Tutorial Project. Releases 10|Code modified. Communication with players based on events. &amp;#039;&amp;#039;NotificationAgency pack&amp;#039;&amp;#039; used.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=9&lt;br /&gt;
|description=[[Tutorial Project. Releases 9|Code modified. Each class generates the Object.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=8&lt;br /&gt;
|description=[[Tutorial Project. Releases 8|Code modified. The structure of the project reorganized. Each class placed to the separate package.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=7&lt;br /&gt;
|description=[[Tutorial Project. Release 7|MultiLanguage feature. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=6&lt;br /&gt;
|description=[[Tutorial Project. Release 6|Multiple plays mode. Easy expansion of the list of players. The size of the field mutable. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=5&lt;br /&gt;
|description=[[Tutorial Project. Release 5|Computer&amp;#039;s move based on the prognosis on the depth &amp;#039;&amp;#039;K&amp;#039;&amp;#039; moves. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
|pe=&amp;#039;&amp;#039;&amp;#039;+&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=4&lt;br /&gt;
|description=[[Tutorial Project. Release 4|Safe computer&amp;#039;s move - random. The code of the player-computer restructured.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=3&lt;br /&gt;
|description=[[Tutorial Project. Release 3|N players. The type of the player (computer or human) - by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=2&lt;br /&gt;
|description=[[Tutorial Project. Release 2|Players - objects. The initial move of the computer - random.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=1&lt;br /&gt;
|description=[[Tutorial Project. Release 1|Players: computer and human. The initial move by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Building notes==&lt;br /&gt;
{{SpbTestedWithEn}}&lt;br /&gt;
&lt;br /&gt;
Releases 1-7 projects may be easily created by copying the code directly from the wiki pages.&lt;br /&gt;
Since Release 8 you need to download the set of projects.&lt;br /&gt;
&lt;br /&gt;
Releases 1-9 projects may be built one by one without any tricks.&lt;br /&gt;
&lt;br /&gt;
Since Release 10 all projects use SpbSolutions IDE variable, which must refer to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
Since Release 11 some projects demonstrate building libraries, thus user must have Microsoft lib.exe program tool (see details in the release appropriate Readme.html file). &lt;br /&gt;
&lt;br /&gt;
Some Projects since Release 13 demonstrate and use the DLL creation. So these projects must be built using VIP CE only (please see details in [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]]).&lt;br /&gt;
&lt;br /&gt;
Projects placed to the Release 14 (Polyline14) PzlBasedApplication folder need to run the registration procedure after building all projects placed to the Containers directory. This must be done using the Programs\pzlBasedApplication\RegisterComponents.cmd command file.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Учебный Проект]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:Example_chain&amp;diff=2604</id>
		<title>Template:Example chain</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:Example_chain&amp;diff=2604"/>
		<updated>2011-04-12T18:26:46Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;|-&lt;br /&gt;
|{{{type}}}&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|{{{release}}}&lt;br /&gt;
|{{{description}}}&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|{{{target}}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2603</id>
		<title>Tutorial Project Evolutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2603"/>
		<updated>2011-04-12T18:25:13Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: /* Before you start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
==Motivation==&lt;br /&gt;
This is an example of the evolution of the project development beginning from the initial idea till the today status. A very easy game has been chosen as the basic idea. We do not know the initial name of this game so we call it Polyline.&lt;br /&gt;
&lt;br /&gt;
Each development step represented as the release, so you can see step by step the evolution of the application. Each release expands the functionality of the application, moving along the way the code is extended, modified and restructured or only restructured and modified. &lt;br /&gt;
&lt;br /&gt;
Looking carefully on the code of each release you can see technique of the using of the Visual Prolog and advanced tools. It can be used to study the Visual Prolog features. &lt;br /&gt;
&lt;br /&gt;
{{PolyLine Game Rules}}&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
VipSpbSDK_PE_73_Examples_Polyline is part of the VipSpbSDK. VipSpbSDK - is the set of tools to develop applications based on Visual Prolog from Prolog Development Center A/S &lt;br /&gt;
To build and study projects of series you must install [http://www.visual-prolog.com|Visual Prolog programming system]&lt;br /&gt;
&lt;br /&gt;
The reference information regarding the features depending on the vesrion of the Visual Prolog and version of the VipSpb SDK please see in the [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]].&lt;br /&gt;
Short information regarding each release may be found in the table below.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!SRC&lt;br /&gt;
!Release&lt;br /&gt;
!Short Description&lt;br /&gt;
!User Interface&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=14&lt;br /&gt;
|description=[[Tutorial Project. Release 14|The demonstration of the use of the pzl-Technology (DLL-based agreements)]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=13&lt;br /&gt;
|description=[[Tutorial Project. Release 13|The demonstration of various ways of the interaction with components placed to DLLs]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=12&lt;br /&gt;
|description=[[Tutorial Project. Release 12|Projects family with UI - ObjectConsole, Windows. The game dimension problem solved]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=11&lt;br /&gt;
|description=[[Tutorial Project. Release 11|Projects family with different kinds of UI - Console, ObjectConsole, Windows. The usage of Libraries. New Player added.]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=10&lt;br /&gt;
|description=[[Tutorial Project. Releases 10|Code modified. Communication with players based on events. &amp;#039;&amp;#039;NotificationAgency pack&amp;#039;&amp;#039; used.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=9&lt;br /&gt;
|description=[[Tutorial Project. Releases 9|Code modified. Each class generates the Object.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=8&lt;br /&gt;
|description=[[Tutorial Project. Releases 8|Code modified. The structure of the project reorganized. Each class placed to the separate package.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=7&lt;br /&gt;
|description=[[Tutorial Project. Release 7|MultiLanguage feature. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=6&lt;br /&gt;
|description=[[Tutorial Project. Release 6|Multiple plays mode. Easy expansion of the list of players. The size of the field mutable. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=5&lt;br /&gt;
|description=[[Tutorial Project. Release 5|Computer&amp;#039;s move based on the prognosis on the depth &amp;#039;&amp;#039;K&amp;#039;&amp;#039; moves. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
|pe=&amp;#039;&amp;#039;&amp;#039;+&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=4&lt;br /&gt;
|description=[[Tutorial Project. Release 4|Safe computer&amp;#039;s move - random. The code of the player-computer restructured.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=3&lt;br /&gt;
|description=[[Tutorial Project. Release 3|N players. The type of the player (computer or human) - by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=2&lt;br /&gt;
|description=[[Tutorial Project. Release 2|Players - objects. The initial move of the computer - random.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=1&lt;br /&gt;
|description=[[Tutorial Project. Release 1|Players: computer and human. The initial move by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Building notes==&lt;br /&gt;
{{SpbTestedWithEn}}&lt;br /&gt;
Releases 1-7 projects may be easily created by copying the code directly from the wiki pages.&lt;br /&gt;
Since Release 8 you need to download the set of projects.&lt;br /&gt;
&lt;br /&gt;
Releases 1-9 projects may be built one by one without any tricks.&lt;br /&gt;
&lt;br /&gt;
Since Release 10 all projects use SpbSolutions IDE variable, which must refer to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
Since Release 11 some projects demonstrate building libraries, thus user must have Microsoft lib.exe program tool (see details in the release appropriate Readme.html file). &lt;br /&gt;
&lt;br /&gt;
Some Projects since Release 13 demonstrate and use the DLL creation. So these projects must be built using VIP CE only (please see details in [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]]).&lt;br /&gt;
&lt;br /&gt;
Projects placed to the Release 14 (Polyline14) PzlBasedApplication folder need to run the registration procedure after building all projects placed to the Containers directory. This must be done using the Programs\pzlBasedApplication\RegisterComponents.cmd command file.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Учебный Проект]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2602</id>
		<title>Tutorial Project Evolutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2602"/>
		<updated>2011-04-12T18:23:06Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: /* Building notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
==Motivation==&lt;br /&gt;
This is an example of the evolution of the project development beginning from the initial idea till the today status. A very easy game has been chosen as the basic idea. We do not know the initial name of this game so we call it Polyline.&lt;br /&gt;
&lt;br /&gt;
Each development step represented as the release, so you can see step by step the evolution of the application. Each release expands the functionality of the application, moving along the way the code is extended, modified and restructured or only restructured and modified. &lt;br /&gt;
&lt;br /&gt;
Looking carefully on the code of each release you can see technique of the using of the Visual Prolog and advanced tools. It can be used to study the Visual Prolog features. &lt;br /&gt;
&lt;br /&gt;
{{PolyLine Game Rules}}&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
VipSpbSDK_PE_73_Examples_Polyline is part of the VipSpbSDK. VipSpbSDK - is the set of tools to develop applications based on Visual Prolog from Prolog Development Center A/S &lt;br /&gt;
To build and study projects of series you must install [http://www.visual-prolog.com|Visual Prolog programming system]&lt;br /&gt;
&lt;br /&gt;
The reference information regarding the features depending on the vesrion of the Visual Prolog and version of the VipSpb SDK please see in the [[Polyline Version Reference|’’’Version Reference’’’]].&lt;br /&gt;
Short information regarding each release may be found in the table below.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!SRC&lt;br /&gt;
!Release&lt;br /&gt;
!Short Description&lt;br /&gt;
!User Interface&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=14&lt;br /&gt;
|description=[[Tutorial Project. Release 14|The demonstration of the use of the pzl-Technology (DLL-based agreements)]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=13&lt;br /&gt;
|description=[[Tutorial Project. Release 13|The demonstration of various ways of the interaction with components placed to DLLs]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=12&lt;br /&gt;
|description=[[Tutorial Project. Release 12|Projects family with UI - ObjectConsole, Windows. The game dimension problem solved]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=11&lt;br /&gt;
|description=[[Tutorial Project. Release 11|Projects family with different kinds of UI - Console, ObjectConsole, Windows. The usage of Libraries. New Player added.]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=10&lt;br /&gt;
|description=[[Tutorial Project. Releases 10|Code modified. Communication with players based on events. &amp;#039;&amp;#039;NotificationAgency pack&amp;#039;&amp;#039; used.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=9&lt;br /&gt;
|description=[[Tutorial Project. Releases 9|Code modified. Each class generates the Object.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=8&lt;br /&gt;
|description=[[Tutorial Project. Releases 8|Code modified. The structure of the project reorganized. Each class placed to the separate package.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=7&lt;br /&gt;
|description=[[Tutorial Project. Release 7|MultiLanguage feature. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=6&lt;br /&gt;
|description=[[Tutorial Project. Release 6|Multiple plays mode. Easy expansion of the list of players. The size of the field mutable. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=5&lt;br /&gt;
|description=[[Tutorial Project. Release 5|Computer&amp;#039;s move based on the prognosis on the depth &amp;#039;&amp;#039;K&amp;#039;&amp;#039; moves. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
|pe=&amp;#039;&amp;#039;&amp;#039;+&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=4&lt;br /&gt;
|description=[[Tutorial Project. Release 4|Safe computer&amp;#039;s move - random. The code of the player-computer restructured.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=3&lt;br /&gt;
|description=[[Tutorial Project. Release 3|N players. The type of the player (computer or human) - by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=2&lt;br /&gt;
|description=[[Tutorial Project. Release 2|Players - objects. The initial move of the computer - random.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=1&lt;br /&gt;
|description=[[Tutorial Project. Release 1|Players: computer and human. The initial move by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Building notes==&lt;br /&gt;
{{SpbTestedWithEn}}&lt;br /&gt;
Releases 1-7 projects may be easily created by copying the code directly from the wiki pages.&lt;br /&gt;
Since Release 8 you need to download the set of projects.&lt;br /&gt;
&lt;br /&gt;
Releases 1-9 projects may be built one by one without any tricks.&lt;br /&gt;
&lt;br /&gt;
Since Release 10 all projects use SpbSolutions IDE variable, which must refer to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
Since Release 11 some projects demonstrate building libraries, thus user must have Microsoft lib.exe program tool (see details in the release appropriate Readme.html file). &lt;br /&gt;
&lt;br /&gt;
Some Projects since Release 13 demonstrate and use the DLL creation. So these projects must be built using VIP CE only (please see details in [[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Version Reference&amp;#039;&amp;#039;&amp;#039;]]).&lt;br /&gt;
&lt;br /&gt;
Projects placed to the Release 14 (Polyline14) PzlBasedApplication folder need to run the registration procedure after building all projects placed to the Containers directory. This must be done using the Programs\pzlBasedApplication\RegisterComponents.cmd command file.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Учебный Проект]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2601</id>
		<title>Tutorial Project Evolutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2601"/>
		<updated>2011-04-12T18:22:12Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: /* Building notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
==Motivation==&lt;br /&gt;
This is an example of the evolution of the project development beginning from the initial idea till the today status. A very easy game has been chosen as the basic idea. We do not know the initial name of this game so we call it Polyline.&lt;br /&gt;
&lt;br /&gt;
Each development step represented as the release, so you can see step by step the evolution of the application. Each release expands the functionality of the application, moving along the way the code is extended, modified and restructured or only restructured and modified. &lt;br /&gt;
&lt;br /&gt;
Looking carefully on the code of each release you can see technique of the using of the Visual Prolog and advanced tools. It can be used to study the Visual Prolog features. &lt;br /&gt;
&lt;br /&gt;
{{PolyLine Game Rules}}&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
VipSpbSDK_PE_73_Examples_Polyline is part of the VipSpbSDK. VipSpbSDK - is the set of tools to develop applications based on Visual Prolog from Prolog Development Center A/S &lt;br /&gt;
To build and study projects of series you must install [http://www.visual-prolog.com|Visual Prolog programming system]&lt;br /&gt;
&lt;br /&gt;
The reference information regarding the features depending on the vesrion of the Visual Prolog and version of the VipSpb SDK please see in the [[Polyline Version Reference|’’’Version Reference’’’]].&lt;br /&gt;
Short information regarding each release may be found in the table below.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!SRC&lt;br /&gt;
!Release&lt;br /&gt;
!Short Description&lt;br /&gt;
!User Interface&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=14&lt;br /&gt;
|description=[[Tutorial Project. Release 14|The demonstration of the use of the pzl-Technology (DLL-based agreements)]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=13&lt;br /&gt;
|description=[[Tutorial Project. Release 13|The demonstration of various ways of the interaction with components placed to DLLs]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=12&lt;br /&gt;
|description=[[Tutorial Project. Release 12|Projects family with UI - ObjectConsole, Windows. The game dimension problem solved]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=11&lt;br /&gt;
|description=[[Tutorial Project. Release 11|Projects family with different kinds of UI - Console, ObjectConsole, Windows. The usage of Libraries. New Player added.]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=10&lt;br /&gt;
|description=[[Tutorial Project. Releases 10|Code modified. Communication with players based on events. &amp;#039;&amp;#039;NotificationAgency pack&amp;#039;&amp;#039; used.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=9&lt;br /&gt;
|description=[[Tutorial Project. Releases 9|Code modified. Each class generates the Object.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=8&lt;br /&gt;
|description=[[Tutorial Project. Releases 8|Code modified. The structure of the project reorganized. Each class placed to the separate package.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=7&lt;br /&gt;
|description=[[Tutorial Project. Release 7|MultiLanguage feature. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=6&lt;br /&gt;
|description=[[Tutorial Project. Release 6|Multiple plays mode. Easy expansion of the list of players. The size of the field mutable. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=5&lt;br /&gt;
|description=[[Tutorial Project. Release 5|Computer&amp;#039;s move based on the prognosis on the depth &amp;#039;&amp;#039;K&amp;#039;&amp;#039; moves. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
|pe=&amp;#039;&amp;#039;&amp;#039;+&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=4&lt;br /&gt;
|description=[[Tutorial Project. Release 4|Safe computer&amp;#039;s move - random. The code of the player-computer restructured.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=3&lt;br /&gt;
|description=[[Tutorial Project. Release 3|N players. The type of the player (computer or human) - by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=2&lt;br /&gt;
|description=[[Tutorial Project. Release 2|Players - objects. The initial move of the computer - random.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=1&lt;br /&gt;
|description=[[Tutorial Project. Release 1|Players: computer and human. The initial move by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Building notes==&lt;br /&gt;
{{SpbTestedWithEn}}&lt;br /&gt;
Releases 1-7 projects may be easily created by copying the code directly from the wiki pages.&lt;br /&gt;
Since Release 8 you need to download the set of projects.&lt;br /&gt;
&lt;br /&gt;
Releases 1-9 projects may be built one by one without any tricks.&lt;br /&gt;
&lt;br /&gt;
Since Release 10 all projects use SpbSolutions IDE variable, which must refer to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
Since Release 11 some projects demonstrate building libraries, thus user must have Microsoft lib.exe program tool (see details in the release appropriate Readme.html file). &lt;br /&gt;
&lt;br /&gt;
Some Projects since Release 13 demonstrate and use the DLL creation. So these projects must be built using VIP CE only (please see details in [[SpbSdk Examples Polyline Version Reference|VersionReference]]).&lt;br /&gt;
&lt;br /&gt;
Projects placed to the Release 14 (Polyline14) PzlBasedApplication folder need to run the registration procedure after building all projects placed to the Containers directory. This must be done using the Programs\pzlBasedApplication\RegisterComponents.cmd command file.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Учебный Проект]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2600</id>
		<title>Tutorial Project Evolutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project_Evolutions&amp;diff=2600"/>
		<updated>2011-04-12T18:18:41Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
==Motivation==&lt;br /&gt;
This is an example of the evolution of the project development beginning from the initial idea till the today status. A very easy game has been chosen as the basic idea. We do not know the initial name of this game so we call it Polyline.&lt;br /&gt;
&lt;br /&gt;
Each development step represented as the release, so you can see step by step the evolution of the application. Each release expands the functionality of the application, moving along the way the code is extended, modified and restructured or only restructured and modified. &lt;br /&gt;
&lt;br /&gt;
Looking carefully on the code of each release you can see technique of the using of the Visual Prolog and advanced tools. It can be used to study the Visual Prolog features. &lt;br /&gt;
&lt;br /&gt;
{{PolyLine Game Rules}}&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
VipSpbSDK_PE_73_Examples_Polyline is part of the VipSpbSDK. VipSpbSDK - is the set of tools to develop applications based on Visual Prolog from Prolog Development Center A/S &lt;br /&gt;
To build and study projects of series you must install [http://www.visual-prolog.com|Visual Prolog programming system]&lt;br /&gt;
&lt;br /&gt;
The reference information regarding the features depending on the vesrion of the Visual Prolog and version of the VipSpb SDK please see in the [[Polyline Version Reference|’’’Version Reference’’’]].&lt;br /&gt;
Short information regarding each release may be found in the table below.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!SRC&lt;br /&gt;
!Release&lt;br /&gt;
!Short Description&lt;br /&gt;
!User Interface&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=14&lt;br /&gt;
|description=[[Tutorial Project. Release 14|The demonstration of the use of the pzl-Technology (DLL-based agreements)]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=13&lt;br /&gt;
|description=[[Tutorial Project. Release 13|The demonstration of various ways of the interaction with components placed to DLLs]]&lt;br /&gt;
|target=Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=12&lt;br /&gt;
|description=[[Tutorial Project. Release 12|Projects family with UI - ObjectConsole, Windows. The game dimension problem solved]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=11&lt;br /&gt;
|description=[[Tutorial Project. Release 11|Projects family with different kinds of UI - Console, ObjectConsole, Windows. The usage of Libraries. New Player added.]]&lt;br /&gt;
|target=Con/Win&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=10&lt;br /&gt;
|description=[[Tutorial Project. Releases 10|Code modified. Communication with players based on events. &amp;#039;&amp;#039;NotificationAgency pack&amp;#039;&amp;#039; used.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=9&lt;br /&gt;
|description=[[Tutorial Project. Releases 9|Code modified. Each class generates the Object.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=project&lt;br /&gt;
|release=8&lt;br /&gt;
|description=[[Tutorial Project. Releases 8|Code modified. The structure of the project reorganized. Each class placed to the separate package.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=7&lt;br /&gt;
|description=[[Tutorial Project. Release 7|MultiLanguage feature. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=6&lt;br /&gt;
|description=[[Tutorial Project. Release 6|Multiple plays mode. Easy expansion of the list of players. The size of the field mutable. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=5&lt;br /&gt;
|description=[[Tutorial Project. Release 5|Computer&amp;#039;s move based on the prognosis on the depth &amp;#039;&amp;#039;K&amp;#039;&amp;#039; moves. The code reorganized.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
|pe=&amp;#039;&amp;#039;&amp;#039;+&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=4&lt;br /&gt;
|description=[[Tutorial Project. Release 4|Safe computer&amp;#039;s move - random. The code of the player-computer restructured.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=3&lt;br /&gt;
|description=[[Tutorial Project. Release 3|N players. The type of the player (computer or human) - by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=2&lt;br /&gt;
|description=[[Tutorial Project. Release 2|Players - objects. The initial move of the computer - random.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{example_chain&lt;br /&gt;
|type=file&lt;br /&gt;
|release=1&lt;br /&gt;
|description=[[Tutorial Project. Release 1|Players: computer and human. The initial move by choice.]]&lt;br /&gt;
|target=Console&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Building notes==&lt;br /&gt;
{{TestedWithEn}}&lt;br /&gt;
&lt;br /&gt;
Releases 1-7 projects may be easily created by copying the code directly from the wiki pages.&lt;br /&gt;
Since Release 8 you need to download the set of projects.&lt;br /&gt;
&lt;br /&gt;
Releases 1-9 projects may be built one by one without any tricks.&lt;br /&gt;
&lt;br /&gt;
Since Release 10 all projects use SpbSolutions IDE variable, which must refer to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
Since Release 11 some projects demonstrate building libraries, thus user must have Microsoft lib.exe program tool (see details in the release appropriate Readme.html file). &lt;br /&gt;
&lt;br /&gt;
Some Projects since Release 13 demonstrate and use the DLL creation. So these projects must be built using VIP CE only (please see details in [[SpbSdk Examples Polyline Version Reference|VersionReference]]).&lt;br /&gt;
&lt;br /&gt;
Projects placed to the Release 14 (Polyline14) PzlBasedApplication folder need to run the registration procedure after building all projects placed to the Containers directory. This must be done using the Programs\pzlBasedApplication\RegisterComponents.cmd command file.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Учебный Проект]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:PolylineBuildCMD&amp;diff=2599</id>
		<title>Template:PolylineBuildCMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:PolylineBuildCMD&amp;diff=2599"/>
		<updated>2011-04-10T17:22:03Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To build projects the IDE variable SpbSolutions must be set to the VipSpbSDK directory.&lt;br /&gt;
&lt;br /&gt;
To simplify the settings and initial buiding of applicaions the Build.cmd command file included (BuildPersonal.cmd - please see details in &amp;#039;&amp;#039;&amp;#039;[[Polyline Version Reference]]&amp;#039;&amp;#039;&amp;#039; or in &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\VersionReference.html&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
Build.cmd file:&lt;br /&gt;
*sets the SpbSolutions IDE variable, which refers to the VipSpb SDK directory;&lt;br /&gt;
*&amp;quot;knows&amp;quot; where Visual Prolog is installed and uses VipBuilder.exe; &lt;br /&gt;
*builds all projects containing in the subfolders;&lt;br /&gt;
*builds all needed libraries;&lt;br /&gt;
*registers all pzl-Components (if needed);&lt;br /&gt;
*informs regarding the result of each building operation; &lt;br /&gt;
*Build.cmd file may be used together with the Visual Prolog CE only (please see details in &amp;#039;&amp;#039;&amp;#039;[[Polyline Version Reference]]&amp;#039;&amp;#039;&amp;#039; or in &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\VersionReference.html&amp;#039;&amp;#039;&amp;#039;).&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_14&amp;diff=2598</id>
		<title>Tutorial Project. Release 14</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_14&amp;diff=2598"/>
		<updated>2011-04-10T17:19:46Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= The demonstration of practices of the advanced Vip-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The communication of the main application with parts of the application, which are placed to the special kind of DLL (Dynamically Linked Library) - PzlContainers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Notes:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*PzlContainers contains PzlComponents. Both PzlContainers and PzlComponents fit the agreements of the Pzl Technology (VpPuzzle Technology).&lt;br /&gt;
*The detailed description of the VpPuZzle technology can be seen at [http://wiki.visual-prolog.com/index.php?title=Category:VpPuZzle|Pzl technology description].&lt;br /&gt;
|code=&lt;br /&gt;
*The Release 14 contains the set of projects, which demonstrates the different phases of the transformation of the application Polyline Release 13 to the Pzl-based application.&lt;br /&gt;
*The set of projects contains:&lt;br /&gt;
**The Project MonoApplicaion\Polyline.prj6 shows how classes are converted to pzl-Components. Here the wrapping approach been used.&lt;br /&gt;
**The Project MonoApplicaionLib\Polyline.prj6 is the same project as MonoApplicaion\Polyline.prj6, but HumanInterface and model Computer3 represented as the libraries.&lt;br /&gt;
**The directory pzlBasedApplication contains again the set of projects - the main application Polyline.prj6 and the set of projects, corresponding to containers (see version dependant details in the file VersionReference.html):&lt;br /&gt;
***Containers\Competitors\Competitors.prj6&lt;br /&gt;
***Containers\PolylineBlackHorsePlayers\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
***Containers\PolylineGame\PolylineGame.prj6&lt;br /&gt;
***Containers\PolylineGameStatistics\PolylineGameStatistics.prj6&lt;br /&gt;
***Containers\PolylineHumanInterface\PolylineHumanInterface.prj6&lt;br /&gt;
***Containers\PolylineJuniourJudge\PolylineJuniourJudge.prj6&lt;br /&gt;
***Containers\PolylinePublicPlayers\PolylinePublicPlayers.prj6&lt;br /&gt;
***Containers\PolylineSeniourJudge\PolylineSeniourJudge.prj6&lt;br /&gt;
|functionality=&lt;br /&gt;
No changes.&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline13\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build project Programs\MonoApplicaion\Polyline.prj6&lt;br /&gt;
&lt;br /&gt;
Run command files &lt;br /&gt;
*Programs\BuildComputer3Lib.cmd&lt;br /&gt;
*Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Programs\MonoApplicaionLib\Polyline.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Polyline.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\Competitors\Competitors.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineBlackHorsePlayers\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineBlackHorsePlayersLib\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineGame\PolylineGame.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineGameStatistics\PolylineGameStatistics.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineHumanInterface\PolylineHumanInterface.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineHumanInterfaceLib\PolylineHumanInterface.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineJuniourJudge\PolylineJuniourJudge.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylinePublicPlayers\PolylinePublicPlayers.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineSeniourJudge\PolylineSeniourJudge.prj6&lt;br /&gt;
Run command file Programs\pzlBasedApplication\RegisterComponents.cmd&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
*The executable applications correspond to projects: Programs\MonoApplicaion\Polyline.prj6 or Programs\MonoApplicaionLib\Polyline.prj6, where all components are in one application;&lt;br /&gt;
*The project Programs\pzlBasedApplication\Polyline.prj6, which communicates with components placed to pzl-Containers and registered in the PzlRegistry.pzr file. The file PzlRegistry.pzr must be in the same directory as the executable file&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 13]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_14&amp;diff=2597</id>
		<title>Tutorial Project. Release 14</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_14&amp;diff=2597"/>
		<updated>2011-04-10T17:13:58Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: New page: {{PolylineTemplateEn |goal= The demonstration of practices of the advanced Vip-based programming: |goalContent= *The communication of the main application with parts of the application, wh...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= The demonstration of practices of the advanced Vip-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The communication of the main application with parts of the application, which are placed to the special kind of DLL (Dynamically Linked Library) - PzlContainers.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Notes:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*PzlContainers contains PzlComponents. Both PzlContainers and PzlComponents fit the agreements of the Pzl Technology (VpPuzzle Technology).&lt;br /&gt;
*The detailed description of the VpPuZzle technology can be seen at [http://wiki.visual-prolog.com/index.php?title=Category:VpPuZzle|Pzl technology description].&lt;br /&gt;
|code=&lt;br /&gt;
*The Release 14 contains the set of projects, which demonstrates the different phases of the transformation of the application Polyline Release 13 to the Pzl-based application.&lt;br /&gt;
*The set of projects contains:&lt;br /&gt;
**The Project MonoApplicaion\Polyline.prj6 shows how classes are converted to pzl-Components. Here the wrapping approach been used.&lt;br /&gt;
**The Project MonoApplicaionLib\Polyline.prj6 is the same project as MonoApplicaion\Polyline.prj6, but HumanInterface and model Computer3 represented as the libraries.&lt;br /&gt;
**The directory pzlBasedApplication contains again the set of projects - the main application Polyline.prj6 and the set of projects, corresponding to containers (see version dependant details in the file VersionReference.html):&lt;br /&gt;
***Containers\Competitors\Competitors.prj6&lt;br /&gt;
***Containers\PolylineBlackHorsePlayers\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
***Containers\PolylineGame\PolylineGame.prj6&lt;br /&gt;
***Containers\PolylineGameStatistics\PolylineGameStatistics.prj6&lt;br /&gt;
***Containers\PolylineHumanInterface\PolylineHumanInterface.prj6&lt;br /&gt;
***Containers\PolylineJuniourJudge\PolylineJuniourJudge.prj6&lt;br /&gt;
***Containers\PolylinePublicPlayers\PolylinePublicPlayers.prj6&lt;br /&gt;
***Containers\PolylineSeniourJudge\PolylineSeniourJudge.prj6&lt;br /&gt;
|functionality=&lt;br /&gt;
No changes.&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline13\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
&lt;br /&gt;
Programs\MonoApplicaion\Polyline.prj6&lt;br /&gt;
&lt;br /&gt;
Run command files &lt;br /&gt;
*Programs\BuildComputer3Lib.cmd&lt;br /&gt;
*Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Programs\MonoApplicaionLib\Polyline.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Polyline.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\Competitors\Competitors.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineBlackHorsePlayers\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineBlackHorsePlayersLib\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineGame\PolylineGame.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineGameStatistics\PolylineGameStatistics.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineHumanInterface\PolylineHumanInterface.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineHumanInterfaceLib\PolylineHumanInterface.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineJuniourJudge\PolylineJuniourJudge.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylinePublicPlayers\PolylinePublicPlayers.prj6&lt;br /&gt;
*Programs\pzlBasedApplication\Containers\PolylineSeniourJudge\PolylineSeniourJudge.prj6&lt;br /&gt;
Run command file Programs\pzlBasedApplication\RegisterComponents.cmd&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
*The executable applications correspond to projects: Programs\MonoApplicaion\Polyline.prj6 or Programs\MonoApplicaionLib\Polyline.prj6, where all components are in one application;&lt;br /&gt;
*The project Programs\pzlBasedApplication\Polyline.prj6, which communicates with components placed to pzl-Containers and registered in the PzlRegistry.pzr file. The file PzlRegistry.pzr must be in the same directory as the executable file&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 13]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:Polyline12CodeExplanation&amp;diff=2596</id>
		<title>Template:Polyline12CodeExplanation</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:Polyline12CodeExplanation&amp;diff=2596"/>
		<updated>2011-04-10T16:01:14Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: New page: {| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot; |- !Project !Description |- | ObjectWin0/Polyline12_ObjWindows | The code of the class SeniourJudge is modified to make it clear the of the interaction of pla...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Project&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| ObjectWin0/Polyline12_ObjWindows&lt;br /&gt;
| The code of the class SeniourJudge is modified to make it clear the of the interaction of players and the class &amp;#039;&amp;#039;&amp;#039;JuniourJudge&amp;#039;&amp;#039;&amp;#039;. The player model &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; added. The Player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; makes always the same special move. The class JuniourJudge recognizes this special move, doesn&amp;#039;t show it on the board and informs the SeniourJudge about move occurrence. Thus the next move may be done. The maximal amount of moves is defined by the constant &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039; in the class JuniourJudge. The problem appears when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=10000.&lt;br /&gt;
|-&lt;br /&gt;
|ObjectWin1/Polyline12_ObjWindows&lt;br /&gt;
| The first step of the modification of the code to solve the problem. The recursive mechanism of the organization of moves is replaced by the iterative mechanism. The application works stable when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=100000. The multigame mode and the interruption process is not modified correctly.&lt;br /&gt;
|-&lt;br /&gt;
| ObjectWin2/Polyline12_ObjWindows&lt;br /&gt;
| The final version. All modes can run correctly. Test player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; can play, when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=100000.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_12&amp;diff=2595</id>
		<title>Tutorial Project. Release 12</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_12&amp;diff=2595"/>
		<updated>2011-04-10T16:00:53Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= The Release 11 projects family had the game dimension problem - the overloading of the call stack on some values of the multiplication &amp;#039;&amp;#039;&amp;#039;TheSizeOfTheBoard*AmountOfRounds&amp;#039;&amp;#039;&amp;#039; and appropriate breakdown of the application.&lt;br /&gt;
The purpose of the Release 12 is to solve the game dimension problem.&lt;br /&gt;
|goalContent=&lt;br /&gt;
|code=&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;The set of projects&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**The only projects ObjectConsole and  ObjectWin presented in the Release12. The set of projects doesn&amp;#039;t contain projects Console, ConsoleLib, ObjectConsoleLib. These projects will not be supported in the future. &lt;br /&gt;
**The Project ObjectWin contains now three variants ObjectWin0, ObjectWin1, ObjectWin2. These variants show the phases of the modification of the code. &lt;br /&gt;
**The Projects ObjectWinLibX correspond to projects ObjectWinX, but the HumanInterface is represented as library. &lt;br /&gt;
**The project ObjectConsole contains the only final solutions. The purpose of the project ObjectConsole is testing and compatibility check. &lt;br /&gt;
**The test model of the player added&lt;br /&gt;
The only purpose of the creation of the model of the player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; is to simulate the behavior of the application on the large amount of moves, which players make. &lt;br /&gt;
&lt;br /&gt;
Some Explanations:&lt;br /&gt;
{{Polyline12CodeExplanation}}&lt;br /&gt;
&lt;br /&gt;
|functionality=&lt;br /&gt;
No Changes&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline12\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Programs\ObjectConsole\Polyline12_ObjConsole.prj6&lt;br /&gt;
*Programs\ObjectWin0\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWin1\Polyline12_ObjWindows.prj6&lt;br /&gt;
*ProgramsDir\ObjectWin2\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Run command file Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
&lt;br /&gt;
Open and build projects (if needed):&lt;br /&gt;
*Programs\ObjectWinLib0\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWinLib1\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWinLib2\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
*Player Computer00 may be involved as the single player and must be assigned as the Starter.&lt;br /&gt;
&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 12]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_12&amp;diff=2594</id>
		<title>Tutorial Project. Release 12</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_12&amp;diff=2594"/>
		<updated>2011-04-10T15:58:01Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= The Release 11 projects family had the game dimension problem - the overloading of the call stack on some values of the multiplication &amp;#039;&amp;#039;&amp;#039;TheSizeOfTheBoard*AmountOfRounds&amp;#039;&amp;#039;&amp;#039; and appropriate breakdown of the application.&lt;br /&gt;
The purpose of the Release 12 is to solve the game dimension problem.&lt;br /&gt;
|goalContent=&lt;br /&gt;
|code=&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;The set of projects&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**The only projects ObjectConsole and  ObjectWin presented in the Release12. The set of projects doesn&amp;#039;t contain projects Console, ConsoleLib, ObjectConsoleLib. These projects will not be supported in the future. &lt;br /&gt;
**The Project ObjectWin contains now three variants ObjectWin0, ObjectWin1, ObjectWin2. These variants show the phases of the modification of the code. &lt;br /&gt;
**The Projects ObjectWinLibX correspond to projects ObjectWinX, but the HumanInterface is represented as library. &lt;br /&gt;
**The project ObjectConsole contains the only final solutions. The purpose of the project ObjectConsole is testing and compatibility check. &lt;br /&gt;
**The test model of the player added&lt;br /&gt;
The only purpose of the creation of the model of the player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; is to simulate the behavior of the application on the large amount of moves, which players make. &lt;br /&gt;
&lt;br /&gt;
Some Explanations:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Project&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| ObjectWin0/Polyline12_ObjWindows&lt;br /&gt;
| The code of the class SeniourJudge is modified to make it clear the of the interaction of players and the class &amp;#039;&amp;#039;&amp;#039;JuniourJudge&amp;#039;&amp;#039;&amp;#039;. The player model &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; added. The Player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; makes always the same special move. The class JuniourJudge recognizes this special move, doesn&amp;#039;t show it on the board and informs the SeniourJudge about move occurrence. Thus the next move may be done. The maximal amount of moves is defined by the constant &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039; in the class JuniourJudge. The problem appears when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=10000.&lt;br /&gt;
|-&lt;br /&gt;
|ObjectWin1/Polyline12_ObjWindows&lt;br /&gt;
| The first step of the modification of the code to solve the problem. The recursive mechanism of the organization of moves is replaced by the iterative mechanism. The application works stable when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=100000. The multigame mode and the interruption process is not modified correctly.&lt;br /&gt;
|-&lt;br /&gt;
| ObjectWin2/Polyline12_ObjWindows&lt;br /&gt;
| The final version. All modes can run correctly. Test player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; can play, when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=100000.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|functionality=&lt;br /&gt;
No Changes&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline12\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Programs\ObjectConsole\Polyline12_ObjConsole.prj6&lt;br /&gt;
*Programs\ObjectWin0\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWin1\Polyline12_ObjWindows.prj6&lt;br /&gt;
*ProgramsDir\ObjectWin2\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Run command file Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
&lt;br /&gt;
Open and build projects (if needed):&lt;br /&gt;
*Programs\ObjectWinLib0\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWinLib1\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWinLib2\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
*Player Computer00 may be involved as the single player and must be assigned as the Starter.&lt;br /&gt;
&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 12]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_12&amp;diff=2593</id>
		<title>Tutorial Project. Release 12</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_12&amp;diff=2593"/>
		<updated>2011-04-10T15:56:36Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= The Release 11 projects family had the game dimension problem - the overloading of the call stack on some values of the multiplication &amp;#039;&amp;#039;&amp;#039;TheSizeOfTheBoard*AmountOfRounds&amp;#039;&amp;#039;&amp;#039; and appropriate breakdown of the application.&lt;br /&gt;
The purpose of the Release 12 is to solve the game dimension problem.&lt;br /&gt;
|goalContent=&lt;br /&gt;
|code=&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;The set of projects&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**The only projects ObjectConsole and  ObjectWin presented in the Release12. The set of projects doesn&amp;#039;t contain projects Console, ConsoleLib, ObjectConsoleLib. These projects will not be supported in the future. &lt;br /&gt;
**The Project ObjectWin contains now three variants ObjectWin0, ObjectWin1, ObjectWin2. These variants show the phases of the modification of the code. &lt;br /&gt;
**The Projects ObjectWinLibX correspond to projects ObjectWinX, but the HumanInterface is represented as library. &lt;br /&gt;
**The project ObjectConsole contains the only final solutions. The purpose of the project ObjectConsole is testing and compatibility check. &lt;br /&gt;
**The test model of the player added&lt;br /&gt;
The only purpose of the creation of the model of the player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; is to simulate the behavior of the application on the large amount of moves, which players make. &lt;br /&gt;
&lt;br /&gt;
Some Explanations&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Project&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| ObjectWin0/Polyline12_ObjWindows&lt;br /&gt;
| The code of the class SeniourJudge is modified to make it clear the of the interaction of players and the class &amp;#039;&amp;#039;&amp;#039;JuniourJudge&amp;#039;&amp;#039;&amp;#039;. The player model &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; added. The Player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; makes always the same special move. The class JuniourJudge recognizes this special move, doesn&amp;#039;t show it on the board and informs the SeniourJudge about move occurrence. Thus the next move may be done. The maximal amount of moves is defined by the constant &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039; in the class JuniourJudge. The problem appears when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=10000.&lt;br /&gt;
|-&lt;br /&gt;
|ObjectWin1/Polyline12_ObjWindows&lt;br /&gt;
| The first step of the modification of the code to solve the problem. The recursive mechanism of the organization of moves is replaced by the iterative mechanism. The application works stable when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=100000. The multigame mode and the interruption process is not modified correctly.&lt;br /&gt;
|-&lt;br /&gt;
| ObjectWin2/Polyline12_ObjWindows&lt;br /&gt;
| The final version. All modes can run correctly. Test player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; can play, when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=100000.&lt;br /&gt;
|}&lt;br /&gt;
|functionality=&lt;br /&gt;
No Changes&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline12\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Programs\ObjectConsole\Polyline12_ObjConsole.prj6&lt;br /&gt;
*Programs\ObjectWin0\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWin1\Polyline12_ObjWindows.prj6&lt;br /&gt;
*ProgramsDir\ObjectWin2\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Run command file Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
&lt;br /&gt;
Open and build projects (if needed):&lt;br /&gt;
*Programs\ObjectWinLib0\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWinLib1\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWinLib2\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
*Player Computer00 may be involved as the single player and must be assigned as the Starter.&lt;br /&gt;
&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 12]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_13&amp;diff=2592</id>
		<title>Tutorial Project. Release 13</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_13&amp;diff=2592"/>
		<updated>2011-04-10T15:54:02Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= The demonstration of practices of the Vip-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The ways of the communication of the main applicaion with the parts of the application, which are placed to the DLL (Dynamically Linked Library);&lt;br /&gt;
*The practice of the rising and handling the exceptions.&lt;br /&gt;
|code=&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;The set of projects&amp;#039;&amp;#039;&amp;#039;. The Release 13 contains the set strongly dependent projects - the project of the main application and projects of three DLLs, where DLL has  the special project to build it. The set of projects contains: &lt;br /&gt;
**The Project ModelsDLL (generates the DLL), where models of the computer strategies of the game Computer0, Computer1, Computer2 are placed.&lt;br /&gt;
**The Project Computer3DLL (generates the DLL), where the model of the strategy Computer3 is placed.&lt;br /&gt;
**The Project HumanInterfaceDLL (generates the DLL), where classes related to the HumanInterface are placed. This DLL is called using the library, which used while the main application building. &lt;br /&gt;
**Project ObjectWin - the project of the main executable application. &lt;br /&gt;
|functionality=&lt;br /&gt;
*New strategy model Computer3 added.&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline13\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
&lt;br /&gt;
*Programs\Computer3Dll\Computer3Dll.prj6;&lt;br /&gt;
*Programs\HumanInterfaceDll\HumanInterfaceDLL.prj6;&lt;br /&gt;
*Programs\ModelsDll\ModelsDll.prj6. The warning while the compilation points to the incorrect declaration. It is done to demonstrate the reaction on the exception in the DLL;&lt;br /&gt;
*Programs\ObjectWin\Polyline13_ObjWindows.prj6.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
*The application corresponding to the project Programs\ObjectWin\Polyline13_ObjWindows.prj6 must be invoked;&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 13]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_13&amp;diff=2591</id>
		<title>Tutorial Project. Release 13</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_13&amp;diff=2591"/>
		<updated>2011-04-10T15:52:53Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= The demonstration of practices of the Vip-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The ways of the communication of the main applicaion with the parts of the application, which are placed to the DLL (Dynamically Linked Library);&lt;br /&gt;
*The practice of the rising and handling the exceptions.&lt;br /&gt;
|code=&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;The set of projects&amp;#039;&amp;#039;&amp;#039;. The Release 13 contains the set strongly dependent projects - the project of the main application and projects of three DLLs, where DLL has  the special project to build it. The set of projects contains: &lt;br /&gt;
**The Project ModelsDLL (generates the DLL), where models of the computer strategies of the game Computer0, Computer1, Computer2 are placed.&lt;br /&gt;
**The Project Computer3DLL (generates the DLL), where the model of the strategy Computer3 is placed.&lt;br /&gt;
**The Project HumanInterfaceDLL (generates the DLL), where classes related to the HumanInterface are placed. This DLL is called using the library, which used while the main application building. &lt;br /&gt;
**Project ObjectWin - the project of the main executable application. &lt;br /&gt;
|functionality=&lt;br /&gt;
*New strategy model Computer3 added.&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline12\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
&lt;br /&gt;
*Programs\Computer3Dll\Computer3Dll.prj6;&lt;br /&gt;
*Programs\HumanInterfaceDll\HumanInterfaceDLL.prj6;&lt;br /&gt;
*Programs\ModelsDll\ModelsDll.prj6. The warning while the compilation points to the incorrect declaration. It is done to demonstrate the reaction on the exception in the DLL;&lt;br /&gt;
*Programs\ObjectWin\Polyline13_ObjWindows.prj6.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
*The application corresponding to the project Programs\ObjectWin\Polyline13_ObjWindows.prj6 must be invoked;&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 11]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_13&amp;diff=2590</id>
		<title>Tutorial Project. Release 13</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_13&amp;diff=2590"/>
		<updated>2011-04-10T15:51:44Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= The demonstration of practices of the Vip-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The ways of the communication of the main applicaion with the parts of the application, which are placed to the DLL (Dynamically Linked Library);&lt;br /&gt;
*The practice of the rising and handling the exceptions.&lt;br /&gt;
|code=&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;The set of projects&amp;#039;&amp;#039;&amp;#039;. The Release 13 contains the set strongly dependent projects - the project of the main application and projects of three DLLs, where DLL has  the special project to build it.&lt;br /&gt;
The set of projects contains: &lt;br /&gt;
**The Project ModelsDLL (generates the DLL), where models of the computer strategies of the game Computer0, Computer1, Computer2 are placed.&lt;br /&gt;
**The Project Computer3DLL (generates the DLL), where the model of the strategy Computer3 is placed.&lt;br /&gt;
**The Project HumanInterfaceDLL (generates the DLL), where classes related to the HumanInterface are placed. This DLL is called using the library, which used while the main application building. &lt;br /&gt;
**Project ObjectWin - the project of the main executable application. &lt;br /&gt;
|functionality=&lt;br /&gt;
*New strategy model Computer3 added.&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline12\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
&lt;br /&gt;
*Programs\Computer3Dll\Computer3Dll.prj6;&lt;br /&gt;
*Programs\HumanInterfaceDll\HumanInterfaceDLL.prj6;&lt;br /&gt;
*Programs\ModelsDll\ModelsDll.prj6. The warning while the compilation points to the incorrect declaration. It is done to demonstrate the reaction on the exception in the DLL;&lt;br /&gt;
*Programs\ObjectWin\Polyline13_ObjWindows.prj6.&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
*The application corresponding to the project Programs\ObjectWin\Polyline13_ObjWindows.prj6 must be invoked;&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 11]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_12&amp;diff=2589</id>
		<title>Tutorial Project. Release 12</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_12&amp;diff=2589"/>
		<updated>2011-04-10T15:34:36Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= The Release 11 projects family had the game dimension problem - the overloading of the call stack on some values of the multiplication &amp;#039;&amp;#039;&amp;#039;TheSizeOfTheBoard*AmountOfRounds&amp;#039;&amp;#039;&amp;#039; and appropriate breakdown of the application.&lt;br /&gt;
The purpose of the Release 12 is to solve the game dimension problem.&lt;br /&gt;
|goalContent=&lt;br /&gt;
|code=&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;The set of projects&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**The only projects ObjectConsole and  ObjectWin presented in the Release12. The set of projects doesn&amp;#039;t contain projects Console, ConsoleLib, ObjectConsoleLib. These projects will not be supported in the future. &lt;br /&gt;
**The Project ObjectWin contains now three variants ObjectWin0, ObjectWin1, ObjectWin2. These variants show the phases of the modification of the code. &lt;br /&gt;
**The Projects ObjectWinLibX correspond to projects ObjectWinX, but the HumanInterface is represented as library. &lt;br /&gt;
**The project ObjectConsole contains the only final solutions. The purpose of the project ObjectConsole is testing and compatibility check. &lt;br /&gt;
**The test model of the player added&lt;br /&gt;
The only purpose of the creation of the model of the player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; is to simulate the behavior of the application on the large amount of moves, which players make. &lt;br /&gt;
&lt;br /&gt;
Some Explanations&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Project&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
| ObjectWin0/Polyline12_ObjWindows&lt;br /&gt;
| The code of the class SeniourJudge is modified to make it clear the of the interaction of players and the class &amp;#039;&amp;#039;&amp;#039;JuniourJudge&amp;#039;&amp;#039;&amp;#039;. The player model &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; added. The Player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; makes always the same special move. The class JuniourJudge recognizes this special move, doesn&amp;#039;t show it on the board and informs the SeniourJudge about move occurrence. Thus the next move may be done. The maximal amount of moves is defined by the constant &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039; in the class JuniourJudge. The problem appears when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=10000.&lt;br /&gt;
|-&lt;br /&gt;
|ObjectWin1/Polyline12_ObjWindows&lt;br /&gt;
| The first step of the modification of the code to solve the problem. The recursive mechanism of the organization of moves is replaced by the iterative mechanism. The application works stable when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=100000. The multigame mode and the interruption process is not modified correctly.&lt;br /&gt;
|-&lt;br /&gt;
| ObjectWin2/Polyline12_ObjWindows&lt;br /&gt;
| The final version. All modes can run correctly. Test player &amp;#039;&amp;#039;&amp;#039;Computer00&amp;#039;&amp;#039;&amp;#039; can play, when &amp;#039;&amp;#039;&amp;#039;playLimit_C&amp;#039;&amp;#039;&amp;#039;=100000.&lt;br /&gt;
|}&lt;br /&gt;
|functionality=&lt;br /&gt;
No Changes&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline12\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Programs\ObjectConsole\Polyline12_ObjConsole.prj6&lt;br /&gt;
*Programs\ObjectWin0\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWin1\Polyline12_ObjWindows.prj6&lt;br /&gt;
*ProgramsDir\ObjectWin2\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Run command file Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
&lt;br /&gt;
Open and build projects (if needed):&lt;br /&gt;
*Programs\ObjectWinLib0\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWinLib1\Polyline12_ObjWindows.prj6&lt;br /&gt;
*Programs\ObjectWinLib2\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
*Player Computer00 may be involved as the single player and must be assigned as the Starter.&lt;br /&gt;
&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 11]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_11&amp;diff=2588</id>
		<title>Tutorial Project. Release 11</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_11&amp;diff=2588"/>
		<updated>2011-04-08T13:48:00Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= Demonstrate the basic approaches of the VIP-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The difference in the traditional Console and object-oriented approach (ObjectConsole and GUI);&lt;br /&gt;
*Creation of Vip-based libraries;&lt;br /&gt;
*The strong separation of the User Interface and logical part.&lt;br /&gt;
|code=&lt;br /&gt;
*Release 11 is the set of projects, which has the same game logic organization, but differs by the User Interface type - Соnsole, ObjectConsole, Windows.&lt;br /&gt;
*The use of VIP-based libraries.&lt;br /&gt;
**Some components are represented as the source code (.PRO) and some represented as libraries (.LIB). Alternative projects presented.&lt;br /&gt;
**To build libraries the application &amp;#039;&amp;#039;&amp;#039;lib&amp;#039;&amp;#039;&amp;#039; (Microsoft Linker Stub 7.10.3077) has been used.&lt;br /&gt;
*Logic and UI strongly separated&lt;br /&gt;
**In all projects of the Release 11 the code, representing the logic and the code representing the User Interface are strongly separated. &lt;br /&gt;
**All Projects of the Release 11 family use the common set of classes, which supports the logic of the game, configuration settings and the game managing.&lt;br /&gt;
**Each project uses its own concept of the User Interface. It makes the possibility to create other user interface implementations and to use other UI concepts based say on HTML or XML. It is possible even to use other programming languages to create User Interface.&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Universality:&amp;#039;&amp;#039;&amp;#039; The structure of the code of the common used logical part gives the possibility to use the logical part with no change to organize the set of similar flat games. The only one JuniourJudge module must be replaced by the module with the same class name and interface and with the new rules support. The new concepts of models of players must be created accordingly.&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Known problem:&amp;#039;&amp;#039;&amp;#039; The Release 11 set of projects has been grown on the basis of Release 10 project. The interaction between players is organized as the hidden (deeply recursive) process, where the tail recursion demand is not fulfilled. Because of this reason after some value of the multiplication &amp;#039;&amp;#039;&amp;#039;board size&amp;#039;&amp;#039;&amp;#039;*&amp;#039;&amp;#039;&amp;#039;amount of games in the serial games&amp;#039;&amp;#039;&amp;#039; the call stack is overloaded and the application disappears. This problem is fixed in the release 12.&lt;br /&gt;
|functionality=&lt;br /&gt;
{{Polyline11Functionality}}&lt;br /&gt;
&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline11\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Polyline11_Console - console application&lt;br /&gt;
*Polyline11_ObjectConsole object-oriented console&lt;br /&gt;
*Polyline11_ObjWindows - Windows PFC/GUI&lt;br /&gt;
Run the command file Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Polyline11_ConsoleLib - the same but the User Interface placed to the library&lt;br /&gt;
*Polyline11_ObjectConsoleLib - the same but the User Interface placed to the library&lt;br /&gt;
*Polyline11_ObjWindowsLib - Windows PFC/GUI, the User Interface placed to the library&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 11]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:PolylineBuildCMD&amp;diff=2587</id>
		<title>Template:PolylineBuildCMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:PolylineBuildCMD&amp;diff=2587"/>
		<updated>2011-04-08T13:46:25Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To build projects the IDE variable SpbSolutions must be set to the VipSpbSDK directory.&lt;br /&gt;
To simplify the settings and initial buiding of applicaions the Build.cmd command file included (BuildPersonal.cmd - please see details in &amp;#039;&amp;#039;&amp;#039;[[Polyline Version Reference]]&amp;#039;&amp;#039;&amp;#039; or in &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\VersionReference.html&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
Build.cmd file:&lt;br /&gt;
*sets the SpbSolutions IDE variable, which refers to the VipSpb SDK directory;&lt;br /&gt;
*&amp;quot;knows&amp;quot; where Visual Prolog is installed and uses VipBuilder.exe; &lt;br /&gt;
*builds all projects containing in the subfolders;&lt;br /&gt;
*builds all needed libraries;&lt;br /&gt;
*registers all pzl-Components (if needed);&lt;br /&gt;
*informs regarding the result of each building operation; &lt;br /&gt;
*Build.cmd file may be used together with the Visual Prolog CE only (please see details in &amp;#039;&amp;#039;&amp;#039;[[Polyline Version Reference]]&amp;#039;&amp;#039;&amp;#039; or in &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\VersionReference.html&amp;#039;&amp;#039;&amp;#039;).&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_11&amp;diff=2586</id>
		<title>Tutorial Project. Release 11</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_11&amp;diff=2586"/>
		<updated>2011-04-08T13:44:25Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= Demonstrate the basic approaches of the VIP-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The difference in the traditional Console and object-oriented approach (ObjectConsole and GUI);&lt;br /&gt;
*Creation of Vip-based libraries;&lt;br /&gt;
*The strong separation of the User Interface and logical part.&lt;br /&gt;
|code=&lt;br /&gt;
*Release 11 is the set of projects, which has the same game logic organization, but differs by the User Interface type - Соnsole, ObjectConsole, Windows.&lt;br /&gt;
*The use of VIP-based libraries.&lt;br /&gt;
**Some components are represented as the source code (.PRO) and some represented as libraries (.LIB). Alternative projects presented.&lt;br /&gt;
**To build libraries the application &amp;#039;&amp;#039;&amp;#039;lib&amp;#039;&amp;#039;&amp;#039; (Microsoft Linker Stub 7.10.3077) has been used.&lt;br /&gt;
*Logic and UI strongly separated&lt;br /&gt;
**In all projects of the Release 11 the code, representing the logic and the code representing the User Interface are strongly separated. &lt;br /&gt;
**All Projects of the Release 11 family use the common set of classes, which supports the logic of the game, configuration settings and the game managing.&lt;br /&gt;
**Each project uses its own concept of the User Interface. It makes the possibility to create other user interface implementations and to use other UI concepts based say on HTML or XML. It is possible even to use other programming languages to create User Interface.&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Universality&amp;#039;&amp;#039;&amp;#039; The structure of the code of the common used logical part gives the possibility to use the logical part with no change to organize the set of similar flat games. The only one JuniourJudge module must be replaced by the module with the same class name and interface and with the new rules support. The new concepts of models of players must be created accordingly.&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Known problem&amp;#039;&amp;#039;&amp;#039; The Release 11 set of projects has been grown on the basis of Release 10 project. The interaction between players is organized as the hidden (deeply recursive) process, where the tail recursion demand is not fulfilled. Because of this reason after some value of the multiplication &amp;#039;&amp;#039;&amp;#039;board size&amp;#039;&amp;#039;&amp;#039;*&amp;#039;&amp;#039;&amp;#039;amount of games in the serial games&amp;#039;&amp;#039;&amp;#039; the call stack is overloaded and the application disappears. This problem is fixed in the release 12.&lt;br /&gt;
|functionality=&lt;br /&gt;
{{Polyline11Functionality}}&lt;br /&gt;
&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline11\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Polyline11_Console - console application&lt;br /&gt;
*Polyline11_ObjectConsole object-oriented console&lt;br /&gt;
*Polyline11_ObjWindows - Windows PFC/GUI&lt;br /&gt;
Run the command file Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Polyline11_ConsoleLib - the same but the User Interface placed to the library&lt;br /&gt;
*Polyline11_ObjectConsoleLib - the same but the User Interface placed to the library&lt;br /&gt;
*Polyline11_ObjWindowsLib - Windows PFC/GUI, the User Interface placed to the library&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 11]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_11&amp;diff=2585</id>
		<title>Tutorial Project. Release 11</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_11&amp;diff=2585"/>
		<updated>2011-04-08T13:42:54Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= Demonstrate the basic approaches of the VIP-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The difference in the traditional Console and object-oriented approach (ObjectConsole and GUI);&lt;br /&gt;
*Creation of Vip-based libraries;&lt;br /&gt;
*The strong separation of the User Interface and logical part.&lt;br /&gt;
|code=&lt;br /&gt;
*Release 11 is the set of projects, which has the same game logic organization, but differs by the User Interface type - Соnsole, ObjectConsole, Windows.&lt;br /&gt;
*The use of VIP-based libraries.&lt;br /&gt;
**Some components are represented as the source code (.PRO) and some represented as libraries (.LIB). Alternative projects presented.&lt;br /&gt;
**To build libraries the application &amp;#039;&amp;#039;&amp;#039;lib&amp;#039;&amp;#039;&amp;#039; (Microsoft Linker Stub 7.10.3077) has been used.&lt;br /&gt;
*Logic and UI strongly separated&lt;br /&gt;
**In all projects of the Release 11 the code, representing the logic and the code representing the User Interface are strongly separated. &lt;br /&gt;
**All Projects of the Release 11 family use the common set of classes, which supports the logic of the game, configuration settings and the game managing.&lt;br /&gt;
**Each project uses its own concept of the User Interface. It makes the possibility to create other user interface implementations and to use other UI concepts based say on HTML or XML. It is possible even to use other programming languages to create User Interface.&lt;br /&gt;
*’’’Universality.’’’ The structure of the code of the common used logical part gives the possibility to use the logical part with no change to organize the set of similar flat games. The only one JuniourJudge module must be replaced by the module with the same class name and interface and with the new rules support. The new concepts of models of players must be created accordingly.&lt;br /&gt;
*’’’Known problem.’’’ The Release 11 set of projects has been grown on the basis of Release 10 project. The interaction between players is organized as the hidden (deeply recursive) process, where the tail recursion demand is not fulfilled. Because of this reason after some value of the multiplication &amp;#039;&amp;#039;&amp;#039;board size&amp;#039;&amp;#039;&amp;#039;*&amp;#039;&amp;#039;&amp;#039;amount of games in the serial games&amp;#039;&amp;#039;&amp;#039; the call stack is overloaded and the application disappears. This problem is fixed in the release 12.&lt;br /&gt;
|functionality=&lt;br /&gt;
{{Polyline11Functionality}}&lt;br /&gt;
&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline11\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Polyline11_Console - console application&lt;br /&gt;
*Polyline11_ObjectConsole object-oriented console&lt;br /&gt;
*Polyline11_ObjWindows - Windows PFC/GUI&lt;br /&gt;
Run the command file Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Polyline11_ConsoleLib - the same but the User Interface placed to the library&lt;br /&gt;
*Polyline11_ObjectConsoleLib - the same but the User Interface placed to the library&lt;br /&gt;
*Polyline11_ObjWindowsLib - Windows PFC/GUI, the User Interface placed to the library&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 11]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_11&amp;diff=2584</id>
		<title>Tutorial Project. Release 11</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_11&amp;diff=2584"/>
		<updated>2011-04-08T13:41:49Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= Demonstrate the basic approaches of the VIP-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The difference in the traditional Console and object-oriented approach (ObjectConsole and GUI);&lt;br /&gt;
*Creation of Vip-based libraries;&lt;br /&gt;
*The strong separation of the User Interface and logical part.&lt;br /&gt;
|code=&lt;br /&gt;
*Release 11 is the set of projects, which has the same game logic organization, but differs by the User Interface type - Соnsole, ObjectConsole, Windows.&lt;br /&gt;
*The use of VIP-based libraries.&lt;br /&gt;
**Some components are represented as the source code (.PRO) and some represented as libraries (.LIB). Alternative projects presented.&lt;br /&gt;
**To build libraries the application &amp;#039;&amp;#039;&amp;#039;lib&amp;#039;&amp;#039;&amp;#039; (Microsoft Linker Stub 7.10.3077) has been used.&lt;br /&gt;
*Logic and UI strongly separated&lt;br /&gt;
**In all projects of the Release 11 the code, representing the logic and the code representing the User Interface are strongly separated. &lt;br /&gt;
**All Projects of the Release 11 family use the common set of classes, which supports the logic of the game, configuration settings and the game managing.&lt;br /&gt;
**Each project uses its own concept of the User Interface. It makes the possibility to create other user interface implementations and to use other UI concepts based say on HTML or XML. It is possible even to use other programming languages to create User Interface.&lt;br /&gt;
*’’’Universality.’’’ The structure of the code of the common used logical part gives the possibility to use the logical part with no change to organize the set of similar flat games. The only one JuniourJudge module must be replaced by the module with the same class name and interface and with the new rules support. The new concepts of models of players must be created accordingly.&lt;br /&gt;
*’’’Known problem.’’’ The Release 11 set of projects has been grown on the basis of Release 10 project. The interaction between players is organized as the hidden (deeply recursive) process, where the tail recursion demand is not fulfilled. Because of this reason after some value of the multiplication &amp;#039;&amp;#039;&amp;#039;board size&amp;#039;&amp;#039;&amp;#039;*&amp;#039;&amp;#039;&amp;#039;amount of games in the serial games&amp;#039;&amp;#039;&amp;#039; the call stack is overloaded and the application disappears. This problem is fixed in the release 12.&lt;br /&gt;
|functionality=&lt;br /&gt;
{{Polyline11Functionality}}&lt;br /&gt;
&lt;br /&gt;
|install=&lt;br /&gt;
If you have &amp;#039;&amp;#039;&amp;#039;VipSpbSDK&amp;#039;&amp;#039;&amp;#039;, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline11\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|&amp;#039;&amp;#039;&amp;#039;Please, see first your version specialty&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Polyline11_Console - console application&lt;br /&gt;
*Polyline11_ObjectConsole object-oriented console&lt;br /&gt;
*Polyline11_ObjWindows - Windows PFC/GUI&lt;br /&gt;
Run the command file Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Polyline11_ConsoleLib - the same but the User Interface placed to the library&lt;br /&gt;
*Polyline11_ObjectConsoleLib - the same but the User Interface placed to the library&lt;br /&gt;
*Polyline11_ObjWindowsLib - Windows PFC/GUI, the User Interface placed to the library&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 11]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:Spbsdk_version&amp;diff=2583</id>
		<title>Template:Spbsdk version</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:Spbsdk_version&amp;diff=2583"/>
		<updated>2011-04-08T13:37:48Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: New page: |- |{{{release}}} ||{{{part}}} |align=&amp;quot;center&amp;quot;|{{{sdkPE}}} |align=&amp;quot;center&amp;quot;|{{{sdkCE}}} |align=&amp;quot;center&amp;quot;|{{{VipPE}}}&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;|-&lt;br /&gt;
|{{{release}}}&lt;br /&gt;
||{{{part}}}&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|{{{sdkPE}}}&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|{{{sdkCE}}}&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|{{{VipPE}}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Polyline_Version_Reference&amp;diff=2582</id>
		<title>Polyline Version Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Polyline_Version_Reference&amp;diff=2582"/>
		<updated>2011-04-08T13:32:31Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
&lt;br /&gt;
Table below shows:&lt;br /&gt;
* The inclusions projects and command files to the VipSpbSDK Examples Polyline versions&lt;br /&gt;
* The building projects and execution of command files supported by VipPE&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Rel&lt;br /&gt;
!Project or Command file&lt;br /&gt;
!SpbSDK PE&lt;br /&gt;
!SpbSDK CE&lt;br /&gt;
!supported &lt;br /&gt;
&lt;br /&gt;
by VIP PE&lt;br /&gt;
&lt;br /&gt;
{{polyline_version}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:Polyline_version&amp;diff=2581</id>
		<title>Template:Polyline version</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:Polyline_version&amp;diff=2581"/>
		<updated>2011-04-08T13:27:20Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: New page: {{Spbsdk version |release=14 |part= Programs\MonoApplicaion\Polyline.prj  Programs\MonoApplicaionLib\Polyline.prj  Programs\pzlBasedApplication\Polyline.prj  Programs\pzlBasedApplication\C...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Spbsdk version&lt;br /&gt;
|release=14&lt;br /&gt;
|part=&lt;br /&gt;
Programs\MonoApplicaion\Polyline.prj&lt;br /&gt;
&lt;br /&gt;
Programs\MonoApplicaionLib\Polyline.prj&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Polyline.prj&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Containers\Competitors\Competitors.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Containers\PolylineBlackHorsePlayers\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Containers\PolylineBlackHorsePlayersLib\PolylineBlackHorsePlayers.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Containers\PolylineGame\PolylineGame.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Containers\PolylineGameStatistics\PolylineGameStatistics.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Containers\PolylineHumanInterface\PolylineHumanInterface.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Containers\PolylineHumanInterfaceLib\PolylineHumanInterface.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Containers\PolylineJuniourJudge\PolylineJuniourJudge.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Containers\PolylinePublicPlayers\PolylinePublicPlayers.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\Containers\PolylineSeniourJudge\PolylineSeniourJudge.prj6&lt;br /&gt;
&lt;br /&gt;
Build.cmd&lt;br /&gt;
&lt;br /&gt;
BuildPersonal.cmd&lt;br /&gt;
&lt;br /&gt;
Programs\BuildComputer3Lib.cmd&lt;br /&gt;
&lt;br /&gt;
Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
&lt;br /&gt;
Programs\pzlBasedApplication\RegisterComponents.cmd&lt;br /&gt;
|sdkPE=&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;
+&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;
|sdkCE=&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;
+&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;
|VipPE=&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;
-&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;
{{Spbsdk version&lt;br /&gt;
|release=13&lt;br /&gt;
|part=&lt;br /&gt;
Programs\ObjectWin\Polyline13_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ModelsDLL\ModelsDLL.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\HumanInterfaceDLL\HumanInterfaceDLL.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\Computer3Dll\Computer3Dll.prj6&lt;br /&gt;
&lt;br /&gt;
Build.cmd&lt;br /&gt;
&lt;br /&gt;
BuildPersonal.cmd&lt;br /&gt;
|sdkPE=&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;
|sdkCE=&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;
|VipPE=&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;+&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=12&lt;br /&gt;
|part=&lt;br /&gt;
Programs\ObjConsole\Polyline12_ObjConsole.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectWin0\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectWin1\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectWin2\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectWinLib\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectWinLib0\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectWinLib1\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectWinLib2\Polyline12_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Build.cmd&lt;br /&gt;
&lt;br /&gt;
BuildPersonal.cmd&lt;br /&gt;
&lt;br /&gt;
Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
|sdkPE=&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;
+&lt;br /&gt;
&lt;br /&gt;
-&lt;br /&gt;
|sdkCE=&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;
-&lt;br /&gt;
&lt;br /&gt;
+&lt;br /&gt;
|VipPE=&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;
-&lt;br /&gt;
&lt;br /&gt;
-&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=11&lt;br /&gt;
|part=&lt;br /&gt;
Programs\Console\Polyline11_Console.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ConsoleLib\Polyline11_Console.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectConsole\Polyline11_ObjConsole.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectConsoleLib\Polyline11_ObjConsole.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectWin\Polyline11_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Programs\ObjectWinLib\Polyline11_ObjWindows.prj6&lt;br /&gt;
&lt;br /&gt;
Build.cmd&lt;br /&gt;
&lt;br /&gt;
BuildPersonal.cmd&lt;br /&gt;
&lt;br /&gt;
Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
&lt;br /&gt;
Programs\BuildHumanInterfaceLibPersonal.cmd&lt;br /&gt;
|sdkPE=&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;
+&lt;br /&gt;
|sdkCE=&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;
-&lt;br /&gt;
|VipPE=&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;
+&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=10&lt;br /&gt;
|part=Polyline10.prj&lt;br /&gt;
|sdkPE=+&lt;br /&gt;
|sdkCE=+&lt;br /&gt;
|VipPE=+&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=9&lt;br /&gt;
|part=Polyline9.prj&lt;br /&gt;
|sdkPE=+&lt;br /&gt;
|sdkCE=+&lt;br /&gt;
|VipPE=+&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=8&lt;br /&gt;
|part=Polyline8.prj&lt;br /&gt;
|sdkPE=+&lt;br /&gt;
|sdkCE=+&lt;br /&gt;
|VipPE=+&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=7&lt;br /&gt;
|part=Polyline7.prj&lt;br /&gt;
|sdkPE=+&lt;br /&gt;
|sdkCE=+&lt;br /&gt;
|VipPE=+&lt;br /&gt;
}}&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=6&lt;br /&gt;
|part=Polyline6.prj&lt;br /&gt;
|sdkPE=+&lt;br /&gt;
|sdkCE=+&lt;br /&gt;
|VipPE=+&lt;br /&gt;
}}&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=5&lt;br /&gt;
|part=Polyline5.prj&lt;br /&gt;
|sdkPE=+&lt;br /&gt;
|sdkCE=+&lt;br /&gt;
|VipPE=+&lt;br /&gt;
}}&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=4&lt;br /&gt;
|part=Polyline4.prj&lt;br /&gt;
|sdkPE=+&lt;br /&gt;
|sdkCE=+&lt;br /&gt;
|VipPE=+&lt;br /&gt;
}}&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=3&lt;br /&gt;
|part=Polyline3.prj&lt;br /&gt;
|sdkPE=+&lt;br /&gt;
|sdkCE=+&lt;br /&gt;
|VipPE=+&lt;br /&gt;
}}&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=2&lt;br /&gt;
|part=Polyline2.prj&lt;br /&gt;
|sdkPE=+&lt;br /&gt;
|sdkCE=+&lt;br /&gt;
|VipPE=+&lt;br /&gt;
}}&lt;br /&gt;
{{Spbsdk version&lt;br /&gt;
|release=1&lt;br /&gt;
|part=Polyline1.prj&lt;br /&gt;
|sdkPE=+&lt;br /&gt;
|sdkCE=+&lt;br /&gt;
|VipPE=+&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Polyline_Version_Reference&amp;diff=2580</id>
		<title>Polyline Version Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Polyline_Version_Reference&amp;diff=2580"/>
		<updated>2011-04-08T13:25:50Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: New page: {{spbCopyright}}  Table below shows: * The inclusions projects and command files to the VipSpbSDK Examples Polyline versions * The building projects and execution of command files supporte...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{spbCopyright}}&lt;br /&gt;
&lt;br /&gt;
Table below shows:&lt;br /&gt;
* The inclusions projects and command files to the VipSpbSDK Examples Polyline versions&lt;br /&gt;
* The building projects and execution of command files supported by VipPE&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Rel&lt;br /&gt;
!Project or Command file&lt;br /&gt;
!SpbSDK PE&lt;br /&gt;
!SpbSDK CE&lt;br /&gt;
!supported &lt;br /&gt;
&lt;br /&gt;
by VIP PE&lt;br /&gt;
&lt;br /&gt;
{{polyline_version}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Examples]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
&lt;br /&gt;
[[ru:SpbSdk Examples Polyline Version Reference]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:PolylineBuildCMD&amp;diff=2579</id>
		<title>Template:PolylineBuildCMD</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:PolylineBuildCMD&amp;diff=2579"/>
		<updated>2011-04-08T13:22:56Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: New page: To build projects the IDE variable SpbSolutions must be set to the VipSpbSDK directory. To simplify the settings and initial buiding of applicaions the Build.cmd command file included (Bui...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To build projects the IDE variable SpbSolutions must be set to the VipSpbSDK directory.&lt;br /&gt;
To simplify the settings and initial buiding of applicaions the Build.cmd command file included (BuildPersonal.cmd - please see details in in [[Polyline Version Reference]] or in &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\VersionReference.html&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
Build.cmd file:&lt;br /&gt;
*sets the SpbSolutions IDE variable, which refers to the VipSpb SDK directory;&lt;br /&gt;
*&amp;quot;knows&amp;quot; where Visual Prolog is installed and uses VipBuilder.exe; &lt;br /&gt;
*builds all projects containing in the subfolders;&lt;br /&gt;
*builds all needed libraries;&lt;br /&gt;
*registers all pzl-Components (if needed);&lt;br /&gt;
*informs regarding the result of each building operation; &lt;br /&gt;
*Build.cmd file may be used together with the Visual Prolog CE only (please see details in [[Polyline Version Reference]] or in &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\VersionReference.html&amp;#039;&amp;#039;&amp;#039;).&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Template:Polyline11Functionality&amp;diff=2578</id>
		<title>Template:Polyline11Functionality</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Template:Polyline11Functionality&amp;diff=2578"/>
		<updated>2011-04-08T13:21:12Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: New page: {| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot; |- !Picture !Description !Details !Video  |- |Image:ConsoleSmall.jpg |LineByLine User Interaction scenario organization. Ordinary Console strategy.  Multi...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Picture&lt;br /&gt;
!Description&lt;br /&gt;
!Details&lt;br /&gt;
!Video&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:ConsoleSmall.jpg]]&lt;br /&gt;
|LineByLine User Interaction scenario organization. Ordinary Console strategy.&lt;br /&gt;
&lt;br /&gt;
Multilingual support.&lt;br /&gt;
|No details &lt;br /&gt;
|[http://prolog-soft.pdc.dk/Visual-Prolog/Downloads/consoleMovie.zip Download and see Movie... (Zip archive 640 Kb)]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:ObjectConsoleSmall.jpg]]&lt;br /&gt;
|Object-oriented Console. Based on interface components like PushButton, EditConrol etc., mouse based handling User-centered interaction.&lt;br /&gt;
Built on the PFC/Console. The concept is similar to PFC/GUI, including the event driven organization.&lt;br /&gt;
&lt;br /&gt;
No multilingual support.&lt;br /&gt;
|[[Game Polyline. Release 11 ObjectConsole|More Details ...]]&lt;br /&gt;
|[http://prolog-soft.pdc.dk/Visual-Prolog/Downloads/ObjectConsoleMovie.zip Download and see Movie... (Zip archive 2.33 Mb)]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:ObjectWinSmall.jpg]]&lt;br /&gt;
|Windows-based User Interface. PFC/GUI concept used.&lt;br /&gt;
&lt;br /&gt;
No multilingual support.&lt;br /&gt;
|No details &lt;br /&gt;
|[http://prolog-soft.pdc.dk/Visual-Prolog/Downloads/ObjectWinMovie.zip Download and see Movie... (Zip archive 2.9 Mb)]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
====Known problem====&lt;br /&gt;
After some value of the multiplication &amp;#039;&amp;#039;&amp;#039;board size&amp;#039;&amp;#039;&amp;#039;*&amp;#039;&amp;#039;&amp;#039;amount of games in the serial games&amp;#039;&amp;#039;&amp;#039; the application disappears. The reason is explained in the ‘’’Code’’’.&lt;br /&gt;
&lt;br /&gt;
This problem is fixed in the release 12.&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_11&amp;diff=2577</id>
		<title>Tutorial Project. Release 11</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_11&amp;diff=2577"/>
		<updated>2011-04-08T13:20:30Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= Demonstrate the basic approaches of the VIP-based programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The difference in the traditional Console and object-oriented approach (ObjectConsole and GUI);&lt;br /&gt;
*Creation of Vip-based libraries;&lt;br /&gt;
*The strong separation of the User Interface and logical part.&lt;br /&gt;
|code=&lt;br /&gt;
*Release 11 is the set of projects, which has the same game logic organization, but differs by the User Interface type - Соnsole, ObjectConsole, Windows.&lt;br /&gt;
*The use of VIP-based libraries.&lt;br /&gt;
**Some components are represented as the source code (.PRO) and some represented as libraries (.LIB). Alternative projects presented.&lt;br /&gt;
**To build libraries the application &amp;#039;&amp;#039;&amp;#039;lib&amp;#039;&amp;#039;&amp;#039; (Microsoft Linker Stub 7.10.3077) has been used.&lt;br /&gt;
*Logic and UI strongly separated&lt;br /&gt;
**In all projects of the Release 11 the code, representing the logic and the code representing the User Interface are strongly separated. &lt;br /&gt;
**All Projects of the Release 11 family use the common set of classes, which supports the logic of the game, configuration settings and the game managing.&lt;br /&gt;
**Each project uses its own concept of the User Interface. It makes the possibility to create other user interface implementations and to use other UI concepts based say on HTML or XML. It is possible even to use other programming languages to create User Interface.&lt;br /&gt;
*’’’Universality.’’’ The structure of the code of the common used logical part gives the possibility to use the logical part with no change to organize the set of similar flat games. The only one JuniourJudge module must be replaced by the module with the same class name and interface and with the new rules support. The new concepts of models of players must be created accordingly.&lt;br /&gt;
*’’’Known problem.’’’ The Release 11 set of projects has been grown on the basis of Release 10 project. The interaction between players is organized as the hidden (deeply recursive) process, where the tail recursion demand is not fulfilled. Because of this reason after some value of the multiplication &amp;#039;&amp;#039;&amp;#039;board size&amp;#039;&amp;#039;&amp;#039;*&amp;#039;&amp;#039;&amp;#039;amount of games in the serial games&amp;#039;&amp;#039;&amp;#039; the call stack is overloaded and the application disappears. This problem is fixed in the release 12.&lt;br /&gt;
|functionality=&lt;br /&gt;
{{Polyline11Functionality}}&lt;br /&gt;
&lt;br /&gt;
|install=&lt;br /&gt;
If you have ‘’’VipSpbSDK’’’, then you will find all projects in the directory &amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline11\Programs&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
{{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
==Building==&lt;br /&gt;
[[Polyline Version Reference|’’’Please, see first your version specialty’’’]]&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Polyline11_Console - console application&lt;br /&gt;
*Polyline11_ObjectConsole object-oriented console&lt;br /&gt;
*Polyline11_ObjWindows - Windows PFC/GUI&lt;br /&gt;
Run the command file Programs\BuildHumanInterfaceLib.cmd&lt;br /&gt;
Open and build projects:&lt;br /&gt;
*Polyline11_ConsoleLib - the same but the User Interface placed to the library&lt;br /&gt;
*Polyline11_ObjectConsoleLib - the same but the User Interface placed to the library&lt;br /&gt;
*Polyline11_ObjWindowsLib - Windows PFC/GUI, the User Interface placed to the library&lt;br /&gt;
&lt;br /&gt;
{{PolylineBuildCMD}}&lt;br /&gt;
&lt;br /&gt;
|run=&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 11]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_10&amp;diff=2576</id>
		<title>Tutorial Project. Release 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_10&amp;diff=2576"/>
		<updated>2011-04-01T19:44:03Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= Demonstrate the features of the Visual Prolog programming language and system features.&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The communication between objects based on events.&lt;br /&gt;
|code=&lt;br /&gt;
*Code reorganized to support the new functionality.&lt;br /&gt;
*Communication with Players based on events.&lt;br /&gt;
|functionality=&lt;br /&gt;
*Multi Game mode can be repeated.&lt;br /&gt;
&lt;br /&gt;
|install={{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
{{Polyline1_10Open|project=&amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline10\Polyline10.prj&amp;#039;&amp;#039;&amp;#039;}}&lt;br /&gt;
|run=&lt;br /&gt;
*The Polyline10 Project uses the NotificationAgency Package, which is a part of the VipSpb SDK.&lt;br /&gt;
To build the Polyline10 project you must define the IDE valriable SpbSolutions as the path to the SpbSolutions directory.&lt;br /&gt;
*{{PolylineBuildProject_7_11}}&lt;br /&gt;
&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 10]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_10&amp;diff=2575</id>
		<title>Tutorial Project. Release 10</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_10&amp;diff=2575"/>
		<updated>2011-04-01T19:41:39Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: New page: {{PolylineTemplateEn |goal= Demonstrate the features of the Visual Prolog programming language and system features. |goalContent= *The communication between objects based on events. |code=...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= Demonstrate the features of the Visual Prolog programming language and system features.&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The communication between objects based on events.&lt;br /&gt;
|code=&lt;br /&gt;
*Code reorganized to support the new functionality.&lt;br /&gt;
*Communication with Players based on events.&lt;br /&gt;
|functionality=&lt;br /&gt;
*Multi Game mode can be repeated.&lt;br /&gt;
&lt;br /&gt;
|install={{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
{{Polyline1_10Open|project=&amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline10\Polyline10.prj&amp;#039;&amp;#039;&amp;#039;}}&lt;br /&gt;
|run=&lt;br /&gt;
*{{PolylineBuildProject_7_11}}&lt;br /&gt;
*The Polyline10 Project uses the NotificationAgency Package, which is a part of the VipSpb SDK.&lt;br /&gt;
To build the Polyline10 project you must define the IDE valriable SpbSolutions as the path to the SpbSolutions directory.&lt;br /&gt;
{{PolylineRun7_X}}&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 10]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7._Class_Computer2&amp;diff=2574</id>
		<title>Tutorial Project. Release 7. Class Computer2</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7._Class_Computer2&amp;diff=2574"/>
		<updated>2011-04-01T13:43:50Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tutorial Project. Release 7. Players}}&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
/******************************************&lt;br /&gt;
Class computer2&lt;br /&gt;
&lt;br /&gt;
Predicate SuccessfullStep implementation&lt;br /&gt;
written by Elena Efimova&lt;br /&gt;
******************************************/&lt;br /&gt;
class computer2:player&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    getPlayerDescriptor:(game::language_D)-&amp;gt;string Descriptor.&lt;br /&gt;
 &lt;br /&gt;
end class computer2&lt;br /&gt;
 &lt;br /&gt;
implement computer2&lt;br /&gt;
    inherits genericComputer&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        PolyLineBraneObj=polylineStrategy2::new(),&lt;br /&gt;
        setpolylineStrategy(PolyLineBraneObj).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
   getPlayerDescriptor(game::en)=polylineStrategy2::playerDescriptorEn_C.&lt;br /&gt;
   getPlayerDescriptor(game::ru)=polylineStrategy2::playerDescriptorRu_C.&lt;br /&gt;
 &lt;br /&gt;
end implement computer2&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class polylineStrategy2&lt;br /&gt;
******************************************/&lt;br /&gt;
class polylineStrategy2:polylineStrategy&lt;br /&gt;
open core&lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    playerDescriptorEn_C=&amp;quot;Computer2: Limited Depth. Despair move - random&amp;quot;.&lt;br /&gt;
    playerDescriptorRu_C=&amp;quot;Computer2: Ограниченная глубина. Ход отчаяния - случайный&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
end class polylineStrategy2&lt;br /&gt;
 &lt;br /&gt;
implement polylineStrategy2&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;polylineStrategy2&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    maxDepth_V:positive:=5.&lt;br /&gt;
    genericComputer_V:genericComputer:=erroneous.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        defineSearchDepth().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setGenericComputer(GenericComputerObj):-&lt;br /&gt;
        genericComputer_V:=GenericComputerObj.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    defineSearchDepth:().&lt;br /&gt;
clauses&lt;br /&gt;
    defineSearchDepth():-&lt;br /&gt;
        DepthStr=humanInterface::getInput(humanInterface::searchDepth_S,toString(maxDepth_V)),&lt;br /&gt;
        not(DepthStr=&amp;quot;&amp;quot;),&lt;br /&gt;
        !,&lt;br /&gt;
        try&lt;br /&gt;
            maxDepth_V:=toTerm(DepthStr),&lt;br /&gt;
            if maxDepth_V mod 2 = 0 then&lt;br /&gt;
                maxDepth_V:=maxDepth_V+1&lt;br /&gt;
            end if    &lt;br /&gt;
        catch _TraceID1 do&lt;br /&gt;
            humanInterface::announce(humanInterface::errorMustBeNumber_S,&amp;quot;&amp;quot;),&lt;br /&gt;
            defineSearchDepth()&lt;br /&gt;
        end try.&lt;br /&gt;
    defineSearchDepth().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    successfulStep(PolyLine)=BestMove:-&lt;br /&gt;
        BestMove=successfulStep(maxDepth_V,PolyLine).&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    successfulStep: (integer Counter, juniourJudge::cell*)-&amp;gt;juniourJudge::cell nondeterm.&lt;br /&gt;
clauses&lt;br /&gt;
    successfulStep(Counter,PolyLine)=BestMove:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine,_PolyLine1,BestMove),&lt;br /&gt;
        isStepSuccessful(Counter,PolyLine,BestMove),&lt;br /&gt;
        !.&lt;br /&gt;
    successfulStep(Counter,PolyLine)=Cell:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine, PolyLine1,Cell),&lt;br /&gt;
            not(_=successfulStep(Counter-1,PolyLine1)).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    isStepSuccessful:(integer Counter,juniourJudge::cell* PolyLine,juniourJudge::cell BestMove) determ.&lt;br /&gt;
clauses&lt;br /&gt;
    isStepSuccessful(_Counter,PolyLine,BestMove):-&lt;br /&gt;
        list::isMember(BestMove, PolyLine),&lt;br /&gt;
        !.&lt;br /&gt;
    isStepSuccessful(Counter,_PolyLine,_BestMove):-&lt;br /&gt;
        Counter&amp;lt;=1.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    randomStep()=Cell:-&lt;br /&gt;
        findAll(NewCell,genericComputer_V:stepCandidate(juniourJudge::polyline_P,_Polyline1, NewCell),CellCandidateListWithDuplicates),&lt;br /&gt;
        CellCandidateList=list::removeDuplicates(CellCandidateListWithDuplicates),&lt;br /&gt;
        not(CellCandidateList=[]),&lt;br /&gt;
        NoOfVariants=list::length(CellCandidateList),&lt;br /&gt;
        ChoiceNo=math::random(NoOfVariants-1),&lt;br /&gt;
        Cell=list::nth(ChoiceNo+1,CellCandidateList).&lt;br /&gt;
 &lt;br /&gt;
end implement polylineStrategy2&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
==References==&lt;br /&gt;
[[ru:Ползунок7. Класс Computer2]]&lt;br /&gt;
[[Category:PolyLine Evolutions]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7._Class_Computer1&amp;diff=2573</id>
		<title>Tutorial Project. Release 7. Class Computer1</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7._Class_Computer1&amp;diff=2573"/>
		<updated>2011-04-01T13:43:08Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tutorial Project. Release 7. Players}}&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
/******************************************&lt;br /&gt;
Class computer1&lt;br /&gt;
&lt;br /&gt;
Predicate SuccessfullStep implementation&lt;br /&gt;
written by Elena Efimova&lt;br /&gt;
******************************************/&lt;br /&gt;
class computer1:player&lt;br /&gt;
open core&lt;br /&gt;
&lt;br /&gt;
predicates&lt;br /&gt;
    getPlayerDescriptor:(game::language_D)-&amp;gt;string Descriptor.&lt;br /&gt;
 &lt;br /&gt;
end class computer1&lt;br /&gt;
 &lt;br /&gt;
implement computer1&lt;br /&gt;
    inherits genericComputer&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        PolyLineBraneObj=polylineStrategy1::new(),&lt;br /&gt;
        setpolylineStrategy(PolyLineBraneObj).&lt;br /&gt;
&lt;br /&gt;
clauses&lt;br /&gt;
   getPlayerDescriptor(game::en)=polylineStrategy1::playerDescriptorEn_C.&lt;br /&gt;
   getPlayerDescriptor(game::ru)=polylineStrategy1::playerDescriptorRu_C.&lt;br /&gt;
 &lt;br /&gt;
end implement computer1&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class polylineStrategy1&lt;br /&gt;
******************************************/&lt;br /&gt;
class polylineStrategy1:polylineStrategy&lt;br /&gt;
open core&lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    playerDescriptorEn_C=&amp;quot;Computer1: Unlimited Depth. Despair move - random&amp;quot;.&lt;br /&gt;
    playerDescriptorRu_C=&amp;quot;Computer1: Неограниченный поиск. Ход отчаяния - случайный&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
end class polylineStrategy1&lt;br /&gt;
 &lt;br /&gt;
implement polylineStrategy1&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;polylineStrategy1&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    genericComputer_V:genericComputer:=erroneous.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setGenericComputer(GenericComputerObj):-&lt;br /&gt;
        genericComputer_V:=GenericComputerObj.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    successfulStep(PolyLine)=BestMove:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine, _PolyLine1,BestMove),&lt;br /&gt;
        list::isMember(BestMove, PolyLine),&lt;br /&gt;
        !.&lt;br /&gt;
    successfulStep(PolyLine)=Cell:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine, PolyLine1,Cell),&lt;br /&gt;
            not(_=successfulStep(PolyLine1)).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    randomStep()=Cell:-&lt;br /&gt;
        findAll(NewCell,genericComputer_V:stepCandidate(juniourJudge::polyline_P,_Polyline1, NewCell),CellCandidateListWithDuplicates),&lt;br /&gt;
        CellCandidateList=list::removeDuplicates(CellCandidateListWithDuplicates),&lt;br /&gt;
        not(CellCandidateList=[]),&lt;br /&gt;
        NoOfVariants=list::length(CellCandidateList),&lt;br /&gt;
        ChoiceNo=math::random(NoOfVariants-1),&lt;br /&gt;
        Cell=list::nth(ChoiceNo+1,CellCandidateList).&lt;br /&gt;
 &lt;br /&gt;
end implement polylineStrategy1&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
==References==&lt;br /&gt;
[[ru:Ползунок7. Класс Computer1]]&lt;br /&gt;
[[Category:PolyLine Evolutions]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7._Class_Computer0&amp;diff=2572</id>
		<title>Tutorial Project. Release 7. Class Computer0</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7._Class_Computer0&amp;diff=2572"/>
		<updated>2011-04-01T13:41:43Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tutorial Project. Release 7. Players}}&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
/******************************************************&lt;br /&gt;
Class computer0&lt;br /&gt;
&lt;br /&gt;
Predicate SuccessfullStep implementation&lt;br /&gt;
Written by Elena Efimova&lt;br /&gt;
*******************************************************/&lt;br /&gt;
class computer0:player&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    getPlayerDescriptor:(game::language_D)-&amp;gt;string Descriptor.&lt;br /&gt;
 &lt;br /&gt;
end class computer0&lt;br /&gt;
 &lt;br /&gt;
implement computer0&lt;br /&gt;
    inherits genericComputer&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        PolyLineBraneObj=polylineStrategy0::new(),&lt;br /&gt;
        setpolylineStrategy(PolyLineBraneObj).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
   getPlayerDescriptor(game::en)=polylineStrategy0::playerDescriptorEn_C.&lt;br /&gt;
   getPlayerDescriptor(game::ru)=polylineStrategy0::playerDescriptorRu_C.&lt;br /&gt;
 &lt;br /&gt;
end implement computer0&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class polylineStrategy0&lt;br /&gt;
******************************************/&lt;br /&gt;
class polylineStrategy0:polylineStrategy&lt;br /&gt;
open core&lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    playerDescriptorEn_C=&amp;quot;Computer0: Unlimited Depth. Despair move - first possible in the list&amp;quot;.&lt;br /&gt;
    playerDescriptorRu_C=&amp;quot;Computer0: Неограниченный поиск. Ход отчаяния - по возможному правилу&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
end class polylineStrategy0&lt;br /&gt;
 &lt;br /&gt;
implement polylineStrategy0&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;polylineStrategy0&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    genericComputer_V:genericComputer:=erroneous.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setGenericComputer(GenericComputerObj):-&lt;br /&gt;
        genericComputer_V:=GenericComputerObj.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    successfulStep(PolyLine)=BestMove:-&lt;br /&gt;
        BestMove=successfulStep1(PolyLine),&lt;br /&gt;
        !.&lt;br /&gt;
    successfulStep(PolyLine)=SomeMove:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine, _PolyLine1,SomeMove),&lt;br /&gt;
        !.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    successfulStep1:(juniourJudge::cell* PolyLine)-&amp;gt;juniourJudge::cell determ.&lt;br /&gt;
clauses&lt;br /&gt;
    successfulStep1(PolyLine)=BestMove:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine, _PolyLine1,BestMove),&lt;br /&gt;
        list::isMember(BestMove, PolyLine),&lt;br /&gt;
        !.&lt;br /&gt;
    successfulStep1(PolyLine)=Cell:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine, PolyLine1,Cell),&lt;br /&gt;
            not(_=successfulStep1(PolyLine1)),&lt;br /&gt;
            !.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    randomStep()=Cell:-&lt;br /&gt;
        findAll(NewCell,genericComputer_V:stepCandidate(juniourJudge::polyline_P,_Polyline1, NewCell),CellCandidateListWithDuplicates),&lt;br /&gt;
        CellCandidateList=list::removeDuplicates(CellCandidateListWithDuplicates),&lt;br /&gt;
        not(CellCandidateList=[]),&lt;br /&gt;
        NoOfVariants=list::length(CellCandidateList),&lt;br /&gt;
        ChoiceNo=math::random(NoOfVariants-1),&lt;br /&gt;
        Cell=list::nth(ChoiceNo+1,CellCandidateList).&lt;br /&gt;
 &lt;br /&gt;
end implement polylineStrategy0&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[ru:Ползунок7. Класс Computer0]]&lt;br /&gt;
[[Category:PolyLine Evolutions]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7._Class_GenericComputer&amp;diff=2571</id>
		<title>Tutorial Project. Release 7. Class GenericComputer</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7._Class_GenericComputer&amp;diff=2571"/>
		<updated>2011-04-01T13:40:23Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tutorial Project. Release 7. Players}}&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
/******************************************&lt;br /&gt;
  Interface polylineStrategy&lt;br /&gt;
******************************************/&lt;br /&gt;
interface polylineStrategy&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    setGenericComputer:(genericComputer).&lt;br /&gt;
    successfulStep: (juniourJudge::cell*)-&amp;gt;juniourJudge::cell nondeterm.&lt;br /&gt;
    randomStep:()-&amp;gt;juniourJudge::cell determ.&lt;br /&gt;
 &lt;br /&gt;
end interface polylineStrategy&lt;br /&gt;
&lt;br /&gt;
/************************&lt;br /&gt;
  Class GenericComputer&lt;br /&gt;
************************/&lt;br /&gt;
interface genericComputer&lt;br /&gt;
    supports player&lt;br /&gt;
    supports polylineStrategy&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    setpolylineStrategy:(polylineStrategy).&lt;br /&gt;
    stepCandidate: (juniourJudge::cell*,juniourJudge::cell* [out],juniourJudge::cell [out]) nondeterm.&lt;br /&gt;
 &lt;br /&gt;
end interface genericComputer&lt;br /&gt;
 &lt;br /&gt;
class genericComputer:genericComputer&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
end class genericComputer&lt;br /&gt;
 &lt;br /&gt;
implement genericComputer&lt;br /&gt;
    delegate interface polylineStrategy to polylineStrategy_V&lt;br /&gt;
 &lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    name:string:=&amp;quot;Cmp_&amp;quot;.&lt;br /&gt;
    polylineStrategy_V:polylineStrategy:=erroneous.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setName(ProposedId):-&lt;br /&gt;
        name:=string::format(&amp;quot;%s%s&amp;quot;,name,ProposedId),&lt;br /&gt;
        Name=humanInterface::getInput(humanInterface::playerName_S,name),&lt;br /&gt;
        if not(Name=&amp;quot;&amp;quot;) then&lt;br /&gt;
            name:=Name&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setpolylineStrategy(PolylineStrategyObject):-&lt;br /&gt;
        polylineStrategy_V:=PolylineStrategyObject,&lt;br /&gt;
        polylineStrategy_V:setGenericComputer(This).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    move():-&lt;br /&gt;
        humanInterface::announce(humanInterface::thinker_S,name),&lt;br /&gt;
        Cell=resolveStep(),&lt;br /&gt;
        try&lt;br /&gt;
            juniourJudge::set(toString(Cell))&lt;br /&gt;
        catch _Trace_D do&lt;br /&gt;
            humanInterface::announce(humanInterface::error_S,&amp;quot;Internal Error in the computerStrategy\n&amp;quot;),&lt;br /&gt;
            humanInterface::waitOk()&lt;br /&gt;
        end try.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    resolveStep:()-&amp;gt;juniourJudge::cell.&lt;br /&gt;
clauses&lt;br /&gt;
    resolveStep()=Cell:-&lt;br /&gt;
        Cell=successfulStep(juniourJudge::polyline_P),&lt;br /&gt;
        !.&lt;br /&gt;
    resolveStep()=Cell:-&lt;br /&gt;
        Cell=randomStep(),&lt;br /&gt;
        !.&lt;br /&gt;
    resolveStep()=juniourJudge::c(X+1,Y+1):-&lt;br /&gt;
        X=math::random(juniourJudge::maxColumn_P-1),&lt;br /&gt;
        Y=math::random(juniourJudge::maxRow_P-1).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    stepCandidate([Cell],[Cell,NewCell], NewCell):-&lt;br /&gt;
        juniourJudge::neighbour_nd(Cell, NewCell).&lt;br /&gt;
    stepCandidate([Left, RestrictingCell | PolyLine],[NewCell,Left, RestrictingCell| PolyLine], NewCell):-&lt;br /&gt;
        NewCell=juniourJudge::neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    stepCandidate(PolyLine,list::reverse([NewCell,Left, RestrictingCell |PolyLineTail]),NewCell):-&lt;br /&gt;
        [Left, RestrictingCell |PolyLineTail] = list::reverse(PolyLine),&lt;br /&gt;
        NewCell=juniourJudge::neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin():-&lt;br /&gt;
        humanInterface::announce(humanInterface::win_S,name).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceLoss():-&lt;br /&gt;
        humanInterface::announce(humanInterface::loss_S,name).&lt;br /&gt;
 &lt;br /&gt;
end implement genericComputer&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
==References==&lt;br /&gt;
[[Category:PolyLine Evolutions]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7._Class_Human&amp;diff=2570</id>
		<title>Tutorial Project. Release 7. Class Human</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7._Class_Human&amp;diff=2570"/>
		<updated>2011-04-01T13:40:00Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tutorial Project. Release 7. Players}}&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
/******************************************************&lt;br /&gt;
Written by Victor Yukhtenko&lt;br /&gt;
&lt;br /&gt;
Class human&lt;br /&gt;
******************************************/&lt;br /&gt;
class human:player&lt;br /&gt;
open core&lt;br /&gt;
&lt;br /&gt;
predicates&lt;br /&gt;
    getPlayerDescriptor:(game::language_D)-&amp;gt;string Descriptor.&lt;br /&gt;
&lt;br /&gt;
end class human&lt;br /&gt;
 &lt;br /&gt;
implement human&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    name:string:=&amp;quot;Hum_&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
   getPlayerDescriptor(game::en)=&amp;quot;Human: Your strategy&amp;quot;.&lt;br /&gt;
   getPlayerDescriptor(game::ru)=&amp;quot;Человек: Ваша стратегия&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
clauses&lt;br /&gt;
    setName(ProposedId):-&lt;br /&gt;
        name:=string::format(&amp;quot;%s%s&amp;quot;,name,ProposedId),&lt;br /&gt;
        Name=humanInterface::getInput(humanInterface::playerName_S,name),&lt;br /&gt;
        if not(Name=&amp;quot;&amp;quot;) then&lt;br /&gt;
            name:=Name&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    move():-&lt;br /&gt;
        InputString=humanInterface::getInput(humanInterface::playerStep_S),&lt;br /&gt;
        try&lt;br /&gt;
            juniourJudge::set(InputString)&lt;br /&gt;
        catch TraceID do&lt;br /&gt;
            handleException(TraceID),&lt;br /&gt;
            fail&lt;br /&gt;
        end try,&lt;br /&gt;
        !.&lt;br /&gt;
    move():-&lt;br /&gt;
        move().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin():-&lt;br /&gt;
        humanInterface::announce(humanInterface::win_S,name).&lt;br /&gt;
 &lt;br /&gt;
    announceLoss():-&lt;br /&gt;
        humanInterface::announce(humanInterface::loss_S,name).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    handleException:(exception::traceId TraceID).&lt;br /&gt;
clauses&lt;br /&gt;
    handleException(TraceID):-&lt;br /&gt;
        foreach Descriptor=exception::getDescriptor_nd(TraceID) do&lt;br /&gt;
            Descriptor = exception::descriptor(&lt;br /&gt;
                _ClassInfo1,&lt;br /&gt;
                _Descriptor,&lt;br /&gt;
                _Kind,&lt;br /&gt;
                ExtraInfo,&lt;br /&gt;
                _GMTTime,&lt;br /&gt;
                _ExceptionDescription,&lt;br /&gt;
                _ThreadId),&lt;br /&gt;
            if&lt;br /&gt;
                ExtraInfo=[namedValue(&amp;quot;data&amp;quot;,string(CellPointer))]&lt;br /&gt;
            then&lt;br /&gt;
                humanInterface::announce(humanInterface::errorWrongCell_S,CellPointer)&lt;br /&gt;
            else&lt;br /&gt;
                humanInterface::announce(humanInterface::error_S,&amp;quot;&amp;quot;)&lt;br /&gt;
            end if&lt;br /&gt;
        end foreach.&lt;br /&gt;
 &lt;br /&gt;
end implement human&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
==References==&lt;br /&gt;
[[ru:Ползунок7. Класс Human]]&lt;br /&gt;
[[Category:Tutorial Project Evolutions]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7&amp;diff=2569</id>
		<title>Tutorial Project. Release 7</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_7&amp;diff=2569"/>
		<updated>2011-04-01T13:39:34Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Tutorial Project. Release 7. Players}}&lt;br /&gt;
{{PolylineTemplateEn&lt;br /&gt;
|goal= To demonstrate the features of the Visual Prolog programming language and system features.&lt;br /&gt;
|goalContent=&lt;br /&gt;
|code=&lt;br /&gt;
* The code is updated to support the new functionality.&lt;br /&gt;
|functionality=&lt;br /&gt;
* Multilanguage feature;&lt;br /&gt;
* Indication of the process in the multi game mode.&lt;br /&gt;
|install={{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
{{Polyline1_10Open|project=&amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline7\Polyline7.prj&amp;#039;&amp;#039;&amp;#039;}}&lt;br /&gt;
&lt;br /&gt;
If you do not have the set of examples from VipSPBSDK, then please make the steps as follows: &lt;br /&gt;
*Create the new project with the User Interface strategy Console;&lt;br /&gt;
*Replace the entire content of the file &amp;quot;main.pro&amp;quot; by the code shown below;&lt;br /&gt;
*Build project;&lt;br /&gt;
*Add to the file &amp;quot;main.pro&amp;quot; the text of the program at the page &amp;#039;&amp;#039;Class GenericComputer&amp;#039;&amp;#039;;&lt;br /&gt;
*Add to the file &amp;quot;main.pro&amp;quot; classes of players and modify the code of the class “Competitors”.&lt;br /&gt;
|run=Run the application using the “E” of the IDE or run the executable at the directory EXE.&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
/***************************************************************&lt;br /&gt;
Written by Victor Yukhtenko&lt;br /&gt;
&lt;br /&gt;
SpbSolutions/Examples/Polyline&lt;br /&gt;
&lt;br /&gt;
Predicates&lt;br /&gt;
    neighbour_nd,&lt;br /&gt;
    neighbourOutOfPolyLine_nd&lt;br /&gt;
based on solutions proposed by Elena Efimova&lt;br /&gt;
***************************************************************/&lt;br /&gt;
&lt;br /&gt;
/*****************&lt;br /&gt;
  GOAL&lt;br /&gt;
*****************/&lt;br /&gt;
goal&lt;br /&gt;
    mainExe::run(main::run).&lt;br /&gt;
 &lt;br /&gt;
/*****************&lt;br /&gt;
  Class Main&lt;br /&gt;
*****************/&lt;br /&gt;
implement main&lt;br /&gt;
    open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;main&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    run():-&lt;br /&gt;
        console::init(),   &lt;br /&gt;
        game::run().&lt;br /&gt;
 &lt;br /&gt;
end implement main&lt;br /&gt;
 &lt;br /&gt;
class game&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    language_D=&lt;br /&gt;
        en;&lt;br /&gt;
        ru.&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    language_V:language_D.&lt;br /&gt;
    players_V:player*.&lt;br /&gt;
    multiMode_V:boolean.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    run:().&lt;br /&gt;
    addPlayer:(player Player).&lt;br /&gt;
 &lt;br /&gt;
end class game&lt;br /&gt;
 &lt;br /&gt;
implement game&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;game&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    language_V:language_D:=en.&lt;br /&gt;
    multiMode_V:boolean:=false.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    run():-&lt;br /&gt;
        setLanguage(),&lt;br /&gt;
        humanInterface::setLanguage(language_V),&lt;br /&gt;
        Mode=chooseSingleOrMultiGame(),&lt;br /&gt;
        setGameProperties(),&lt;br /&gt;
        competitors::involvePlayers(),&lt;br /&gt;
        if Mode=single_S then &lt;br /&gt;
            playSingle()&lt;br /&gt;
        else&lt;br /&gt;
            multiMode_V:=true,&lt;br /&gt;
            seniourJudge::playMulti()&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    mode_D=&lt;br /&gt;
        single_S;&lt;br /&gt;
        multi_S.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    setLanguage:().&lt;br /&gt;
clauses&lt;br /&gt;
    setLanguage():-&lt;br /&gt;
        CommandLine = mainExe::getCommandLine(),&lt;br /&gt;
        if string::hasSuffix(CommandLine,&amp;quot;ru&amp;quot;,_RestRu) then&lt;br /&gt;
            language_V:=ru&lt;br /&gt;
        end if,&lt;br /&gt;
        if string::hasSuffix(CommandLine,&amp;quot;en&amp;quot;,_RestEn) then&lt;br /&gt;
            language_V:=en&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    chooseSingleOrMultiGame:()-&amp;gt;mode_D GameOrCompetition.&lt;br /&gt;
clauses&lt;br /&gt;
    chooseSingleOrMultiGame()=Choice:-&lt;br /&gt;
        ChoiceStr=humanInterface::getInput(humanInterface::singleOrMulti_S),&lt;br /&gt;
        if (string::equalIgnoreCase(ChoiceStr,&amp;quot;S&amp;quot;) or ChoiceStr=&amp;quot;&amp;quot;),! then&lt;br /&gt;
            Choice=single_S,&lt;br /&gt;
            !&lt;br /&gt;
        else&lt;br /&gt;
            Choice=multi_S&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    playSingle:().&lt;br /&gt;
clauses&lt;br /&gt;
    playSingle():-&lt;br /&gt;
        StartingPlayer=chooseStartingPlayer(),&lt;br /&gt;
        seniourJudge::playSingle(StartingPlayer),&lt;br /&gt;
        !,&lt;br /&gt;
        playSingle().&lt;br /&gt;
    playSingle().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    setGameProperties:().&lt;br /&gt;
clauses&lt;br /&gt;
    setGameProperties():-&lt;br /&gt;
        juniourJudge::defineStage().&lt;br /&gt;
 &lt;br /&gt;
/***************************&lt;br /&gt;
  Players&lt;br /&gt;
***************************/&lt;br /&gt;
class facts&lt;br /&gt;
    players_V:player*:=[].&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    addPlayer(Player):-&lt;br /&gt;
        players_V:=list::append(players_V,[Player]).&lt;br /&gt;
 &lt;br /&gt;
/***************************&lt;br /&gt;
 Shoose Starting Player&lt;br /&gt;
***************************/&lt;br /&gt;
class predicates&lt;br /&gt;
    chooseStartingPlayer:()-&amp;gt;player determ.&lt;br /&gt;
clauses&lt;br /&gt;
    chooseStartingPlayer()=Player:-&lt;br /&gt;
        not(players_V=[]) and not(players_V=[_SiglePlayer]),&lt;br /&gt;
        findAll(PlayListMember,PlayListMember=playListMember(),PlayList),&lt;br /&gt;
        PlayListStr=string::concatList(PlayList),&lt;br /&gt;
        StartingPlayer=getStartingPlayerInput(PlayListStr),&lt;br /&gt;
        Player=list::nth(StartingPlayer-1,players_V).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    playListMember:()-&amp;gt;string nondeterm.&lt;br /&gt;
clauses&lt;br /&gt;
    playListMember()=PlayersListMember:-&lt;br /&gt;
        I = std::fromTo(1, list::length(game::players_V)),&lt;br /&gt;
            Player=list::nth(I-1,game::players_V),&lt;br /&gt;
            PlayersListMember=string::format(&amp;quot;\n% - %&amp;quot;,I,Player:name).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    getStartingPlayerInput:(string PlayListStr)-&amp;gt;positive StartingPlayerNo determ.&lt;br /&gt;
clauses&lt;br /&gt;
    getStartingPlayerInput(PlayListStr)=StartingPlayer:-&lt;br /&gt;
        StartingPlayerStr=humanInterface::getInput(humanInterface::startingPlayer_S,PlayListStr),&lt;br /&gt;
        if StartingPlayerStr=&amp;quot;&amp;quot; then&lt;br /&gt;
            !,&lt;br /&gt;
            fail&lt;br /&gt;
        else&lt;br /&gt;
            try&lt;br /&gt;
                StartingPlayer=toTerm(StartingPlayerStr),&lt;br /&gt;
                !&lt;br /&gt;
            catch _TraceID1 do&lt;br /&gt;
                humanInterface::announce(humanInterface::errorMustBeNumber_S,&amp;quot;&amp;quot;),&lt;br /&gt;
                fail&lt;br /&gt;
            end try,&lt;br /&gt;
            if StartingPlayer&amp;gt;list::length(players_V) then&lt;br /&gt;
                humanInterface::announce(humanInterface::errorStartingPlayer_S,&amp;quot;&amp;quot;),&lt;br /&gt;
                fail&lt;br /&gt;
            end if&lt;br /&gt;
        end if.&lt;br /&gt;
    getStartingPlayerInput(PlayListStr)=StartingPlayer:-&lt;br /&gt;
        StartingPlayer=getStartingPlayerInput(PlayListStr).&lt;br /&gt;
 &lt;br /&gt;
end implement game&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Class seniorJudge&lt;br /&gt;
************************/&lt;br /&gt;
class seniourJudge&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    inProgress_V:boolean.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    playSingle:(player CurrentPlayer).&lt;br /&gt;
    playMulti:().&lt;br /&gt;
 &lt;br /&gt;
end class seniourJudge&lt;br /&gt;
 &lt;br /&gt;
implement seniourJudge&lt;br /&gt;
open core, humanInterface&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    inProgress_V:boolean:=false.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    playSingle(Player):-&lt;br /&gt;
        inProgress_V=false,&lt;br /&gt;
        humanInterface::showStage(),&lt;br /&gt;
        humanInterface::announce(humanInterface::starter_S,Player:name),&lt;br /&gt;
        inProgress_V:=true,&lt;br /&gt;
        Player:move(),&lt;br /&gt;
        playSingle(Player),&lt;br /&gt;
        !.&lt;br /&gt;
    playSingle(Player):-&lt;br /&gt;
        juniourJudge::isGameOver(),&lt;br /&gt;
        !,&lt;br /&gt;
        if game::multiMode_V=false then&lt;br /&gt;
            Player:announceWin(),&lt;br /&gt;
            foreach (Participant=list::getMember_nd(game::players_V) and not(Participant=Player)) do&lt;br /&gt;
                Participant:announceLoss()&lt;br /&gt;
            end foreach&lt;br /&gt;
        else&lt;br /&gt;
            addWinner(Player)&lt;br /&gt;
        end if,&lt;br /&gt;
        inProgress_V:=false,&lt;br /&gt;
        juniourJudge::reset().&lt;br /&gt;
    playSingle(Player):-&lt;br /&gt;
        NextPlayer=nextPlayer(Player),&lt;br /&gt;
        NextPlayer:move(),&lt;br /&gt;
        !,&lt;br /&gt;
        playSingle(NextPlayer).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    nextPlayer:(player CurrentPlayer)-&amp;gt;player NextPlayer.&lt;br /&gt;
clauses&lt;br /&gt;
    nextPlayer(Player)=NextPlayer:-&lt;br /&gt;
        Index=list::tryGetIndex(Player,game::players_V),&lt;br /&gt;
        NextPlayer=list::tryGetNth(Index+1,game::players_V),&lt;br /&gt;
        !.&lt;br /&gt;
    nextPlayer(_Player)=list::nth(0,game::players_V).&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Multi Mode Handle&lt;br /&gt;
************************/&lt;br /&gt;
class predicates&lt;br /&gt;
    defineNoOfRounds:().&lt;br /&gt;
clauses&lt;br /&gt;
    defineNoOfRounds():-&lt;br /&gt;
        InputString=humanInterface::getInput(humanInterface::noOfRounds_S,toString(noOfRounds_V)),&lt;br /&gt;
        not(InputString=&amp;quot;&amp;quot;),&lt;br /&gt;
        try&lt;br /&gt;
            noOfRounds_V:=toTerm(InputString)&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            humanInterface::announce(humanInterface::errorNoOfRounds_S,&amp;quot;&amp;quot;),&lt;br /&gt;
            defineNoOfRounds()&lt;br /&gt;
        end try,&lt;br /&gt;
        !.&lt;br /&gt;
    defineNoOfRounds().&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    starter_V:player:=erroneous.&lt;br /&gt;
    noOfRounds_V:positive:=10.&lt;br /&gt;
    statistics_F:(boolean TrueIfWon,player,positive Won).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    playMulti():-&lt;br /&gt;
        defineNoOfRounds(),&lt;br /&gt;
        Player=list::getMember_nd(game::players_V),&lt;br /&gt;
            starter_V:=Player,&lt;br /&gt;
            playRound(noOfRounds_V),&lt;br /&gt;
        fail().&lt;br /&gt;
    playMulti():-&lt;br /&gt;
        humanInterface::reset(),&lt;br /&gt;
        PlayersNo=list::length(game::players_V),&lt;br /&gt;
        humanInterface::announce(humanInterface::reportHeader_S,toString(PlayersNo*noOfRounds_V)),&lt;br /&gt;
        findAll&lt;br /&gt;
            (&lt;br /&gt;
            PlayerResultList,&lt;br /&gt;
            (&lt;br /&gt;
                Player=list::getMember_nd(game::players_V),&lt;br /&gt;
                    WinsFirst=calculateWins(Player,true),&lt;br /&gt;
                    WinsNext=calculateWins(Player,false),&lt;br /&gt;
                    WnsTotal=WinsFirst+WinsNext,&lt;br /&gt;
                    PlayerResultList=[Player:name,toString(WnsTotal),toString(WinsFirst),toString(WinsNext)]&lt;br /&gt;
            ),&lt;br /&gt;
            PlayerResultListList&lt;br /&gt;
            ),&lt;br /&gt;
        humanInterface::announce(humanInterface::report_S,toString(PlayerResultListList)),&lt;br /&gt;
        fail().&lt;br /&gt;
    playMulti():-&lt;br /&gt;
        humanInterface::waitOK().&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    wins_V:integer:=0.&lt;br /&gt;
class predicates&lt;br /&gt;
    calculateWins:(player Player,boolean TrueIfFirst)-&amp;gt;integer Sum.&lt;br /&gt;
clauses&lt;br /&gt;
    calculateWins(Player,TrueIfFirst)=_:-&lt;br /&gt;
        wins_V:=0,&lt;br /&gt;
        statistics_F(TrueIfFirst,Player,Won),&lt;br /&gt;
            trap(wins_V:=wins_V+Won,_TraceID,fail),&lt;br /&gt;
        fail.&lt;br /&gt;
    calculateWins(_Player,_TrueIfFirst)=wins_V.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    playRound:(positive NoOfRounds).&lt;br /&gt;
clauses&lt;br /&gt;
    playRound(0):-!.&lt;br /&gt;
    playRound(NoOfRounds):-&lt;br /&gt;
        humanInterface::announce(round_S,toString(noOfRounds_V-NoOfRounds+1)),&lt;br /&gt;
        seniourJudge::playSingle(starter_V),&lt;br /&gt;
        playRound(NoOfRounds-1).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    addWinner:(player).&lt;br /&gt;
clauses&lt;br /&gt;
    addWinner(Player):-&lt;br /&gt;
        if Player=starter_V then &lt;br /&gt;
            TrueIfStarted=true &lt;br /&gt;
        else&lt;br /&gt;
            TrueIfStarted=false &lt;br /&gt;
        end if,&lt;br /&gt;
        addWinner(TrueIfStarted,Player).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    addWinner:(boolean TrueIfStarted,player Player).&lt;br /&gt;
clauses&lt;br /&gt;
    addWinner(TrueIfStarted,Player):-&lt;br /&gt;
        retract(statistics_F(TrueIfStarted,Player,Won)),&lt;br /&gt;
        !,&lt;br /&gt;
        assert(statistics_F(TrueIfStarted,Player,Won+1)).&lt;br /&gt;
    addWinner(TrueIfStarted,Player):-&lt;br /&gt;
        assert(statistics_F(TrueIfStarted,Player,1)).&lt;br /&gt;
 &lt;br /&gt;
end implement seniourJudge&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Class juniourJudge&lt;br /&gt;
************************/&lt;br /&gt;
class juniourJudge&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    cell = c(positive,positive).&lt;br /&gt;
    stepType_D=&lt;br /&gt;
        ordinary_S;&lt;br /&gt;
        winner_S.&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    maxRow_P:positive.&lt;br /&gt;
    maxColumn_P:positive.&lt;br /&gt;
    polyline_P:cell*.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    defineStage:().&lt;br /&gt;
    neighbour_nd: (cell,cell) nondeterm (i,o) (i,i).&lt;br /&gt;
    neighbourOutOfPolyLine_nd:(cell,cell)-&amp;gt;cell nondeterm.&lt;br /&gt;
    set: (string ).&lt;br /&gt;
    isGameOver:() determ.&lt;br /&gt;
    reset:().&lt;br /&gt;
 &lt;br /&gt;
end class juniourJudge&lt;br /&gt;
 &lt;br /&gt;
implement juniourJudge&lt;br /&gt;
open core, humanInterface&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;JuniourJudge&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    maxRow_P:positive:=6.&lt;br /&gt;
    maxColumn_P:positive:=6.&lt;br /&gt;
    polyline_P:cell*:=[].&lt;br /&gt;
    endOfGame_V:boolean:=false.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    fieldSize_D=tableSize(positive X,positive Y).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    defineStage():-&lt;br /&gt;
        defineFieldSize().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    defineFieldSize:().&lt;br /&gt;
clauses&lt;br /&gt;
    defineFieldSize():-&lt;br /&gt;
        InputString=humanInterface::getInput(humanInterface::fieldSize_S,string::format(&amp;quot;%s,%s&amp;quot;,toString(maxColumn_P),toString(maxRow_P))),&lt;br /&gt;
        not(InputString=&amp;quot;&amp;quot;),&lt;br /&gt;
        try&lt;br /&gt;
            hasDomain(fieldSize_D,FieldSize),&lt;br /&gt;
            FieldSize=toTerm(string::format(&amp;quot;tableSize(%s)&amp;quot;,InputString)),&lt;br /&gt;
            FieldSize=tableSize(X,Y),&lt;br /&gt;
            maxColumn_P:=X,&lt;br /&gt;
            maxRow_P:=Y&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            humanInterface::announce(humanInterface::errorFieldSize_S,&amp;quot;&amp;quot;),&lt;br /&gt;
            defineFieldSize()&lt;br /&gt;
        end try,&lt;br /&gt;
        !.&lt;br /&gt;
    defineFieldSize().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    isGameOver():-&lt;br /&gt;
        endOfGame_V=true.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    set(InputString):-&lt;br /&gt;
        Cell=convertToCell(InputString),&lt;br /&gt;
        handleInput (Cell).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    convertToCell:(string InputString)-&amp;gt;cell.&lt;br /&gt;
clauses&lt;br /&gt;
    convertToCell(InputString)=Cell:-&lt;br /&gt;
        trap(Cell=toTerm(InputString),_TraceID,fail),&lt;br /&gt;
        !.&lt;br /&gt;
    convertToCell(InputString)=Cell:-&lt;br /&gt;
        CellString=string::format(&amp;quot;c(%s)&amp;quot;,InputString),&lt;br /&gt;
        trap(Cell=toTerm(CellString),_TraceID,fail),&lt;br /&gt;
        !.&lt;br /&gt;
    convertToCell(InputString)=toTerm(InputString).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    reset():-&lt;br /&gt;
        juniourJudge:: polyline_P:=[],&lt;br /&gt;
        juniourJudge::endOfGame_V:=false.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    handleInput:(juniourJudge::cell).&lt;br /&gt;
clauses&lt;br /&gt;
    handleInput(Cell):-&lt;br /&gt;
        list::isMember(Cell,polyline_P),&lt;br /&gt;
        try &lt;br /&gt;
            _=makePolyLine(Cell,polyline_P) % it will be an exception if wrong Cell, but we ignore it by failing&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            fail&lt;br /&gt;
        end try,&lt;br /&gt;
        !,&lt;br /&gt;
        endOfGame_V:=true,&lt;br /&gt;
        humanInterface::showStep(Cell,winner_S).&lt;br /&gt;
    handleInput (Cell):-&lt;br /&gt;
        polyline_P:=makePolyLine(Cell,polyline_P),&lt;br /&gt;
        !,&lt;br /&gt;
        humanInterface::showStep(Cell,ordinary_S).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    makePolyLine: (cell,cell*)-&amp;gt; cell* multi.&lt;br /&gt;
clauses&lt;br /&gt;
    makePolyLine(c(X,Y),[])=[c(X,Y)]:-&lt;br /&gt;
        X&amp;gt;0,X&amp;lt;=maxColumn_P,&lt;br /&gt;
        Y&amp;gt;0,Y&amp;lt;=maxRow_P,&lt;br /&gt;
        !.&lt;br /&gt;
    makePolyLine(NewCell,[SingleCell])=[NewCell,SingleCell]:-&lt;br /&gt;
        neighbour_nd(SingleCell, NewCell),&lt;br /&gt;
        !.&lt;br /&gt;
    makePolyLine(NewCell,[Left, RestrictingCell | PolyLineTail])=[NewCell, Left, RestrictingCell | PolyLineTail]:-&lt;br /&gt;
        NewCell=neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    makePolyLine(NewCell,PolyLine)=list::reverse([NewCell,Left, RestrictingCell | PolyLineTail]):-&lt;br /&gt;
        [Left, RestrictingCell | PolyLineTail]= list::reverse(PolyLine),&lt;br /&gt;
        NewCell=neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    makePolyLine(NewCell,_PolyLine)= _PolyLine1:-&lt;br /&gt;
        exception::raise(classInfo,wrongStepException,[namedValue(&amp;quot;data&amp;quot;,string(toString(NewCell)))]).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    wrongStepException:exception.&lt;br /&gt;
clauses&lt;br /&gt;
    wrongStepException&lt;br /&gt;
        (&lt;br /&gt;
        classInfo,&lt;br /&gt;
        predicate_Name(),&lt;br /&gt;
        &amp;quot;&amp;quot;&lt;br /&gt;
        ).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    neighbourOutOfPolyLine_nd(Cell,RestrictingCell)=NewCell:-&lt;br /&gt;
        neighbour_nd(Cell,NewCell),&lt;br /&gt;
            not(NewCell = RestrictingCell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    neighbour_nd(c(X, Y), c(X + 1, Y)):- X &amp;lt; maxColumn_P.        &lt;br /&gt;
    neighbour_nd(c(X, Y), c(X, Y + 1)):- Y &amp;lt; maxrow_P.            &lt;br /&gt;
    neighbour_nd(c(X, Y), c(X - 1, Y)):- X &amp;gt; 1.&lt;br /&gt;
    neighbour_nd(c(X, Y), c(X, Y - 1)):- Y &amp;gt; 1.    &lt;br /&gt;
 &lt;br /&gt;
end implement juniourJudge&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Interface Player&lt;br /&gt;
******************************************/&lt;br /&gt;
interface player&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    setName:(string).&lt;br /&gt;
    move:().&lt;br /&gt;
    announceWin:().&lt;br /&gt;
    announceLoss:().&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    name:string.&lt;br /&gt;
 &lt;br /&gt;
end interface player&lt;br /&gt;
 &lt;br /&gt;
/**************&lt;br /&gt;
  Text localization&lt;br /&gt;
**************/&lt;br /&gt;
interface polyLineText&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
        getText:(humanInterface::actionID_D)-&amp;gt;string Text.&lt;br /&gt;
end interface polyLineText&lt;br /&gt;
 &lt;br /&gt;
class polyLineTextRu:polyLineText&lt;br /&gt;
end class polyLineTextRu&lt;br /&gt;
 &lt;br /&gt;
implement polyLineTextRu&lt;br /&gt;
open core, humanInterface&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    getText(TextID)=Text:-&lt;br /&gt;
        Text=getTextInt(TextID),&lt;br /&gt;
        !.&lt;br /&gt;
    getText(_TextID)=&amp;quot;Текст не предусмотрен&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    getTextInt:(humanInterface::actionID_D TextID)-&amp;gt;string Text determ.&lt;br /&gt;
clauses&lt;br /&gt;
    getTextInt(thinker_S)=&amp;quot;% думает ...&amp;quot;.&lt;br /&gt;
    getTextInt(round_S)=&amp;quot;Раунд: %&amp;quot;.&lt;br /&gt;
    getTextInt(beginner_S)=&amp;quot;Первый ход: %&amp;quot;.&lt;br /&gt;
    getTextInt(congratulation_S)=&amp;quot;Игрок % выиграл!&amp;quot;.&lt;br /&gt;
    getTextInt(sorryLoss_S)=&amp;quot;%,  к сожалению, Вы проиграли :-(&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
    getTextInt(singleOrMultipleChoice_S)=&amp;quot;Выберите режим (S или Enter - одиночная игра, другое - мульти):&amp;quot;.&lt;br /&gt;
    getTextInt(fieldSize_S)=&amp;quot;\nВведите размер игрового поля X,Y (по умолчанию %):&amp;quot;.&lt;br /&gt;
    getTextInt(playerStep_S)=&amp;quot;Введите координаты клетки как c(X,Y) или как X,Y: &amp;quot;.&lt;br /&gt;
    getTextInt(playerType_S)=&amp;quot;\nВозможные типы игроков:\n%s\nИгрок #%s. Укажите тип (Enter - конец выбора игроков):&amp;quot;.&lt;br /&gt;
    getTextInt(playerName_S)=&amp;quot;\nВведите имя Игрока (предлагается %):&amp;quot;.&lt;br /&gt;
    getTextInt(startingPlayer_S)=&amp;quot;\nКто первый ходит (номер Игрока или Enter - конец игры)?:&amp;quot;.&lt;br /&gt;
    getTextInt(searchDepth_S)=&amp;quot;\nУкажите глубину поиска решения в шагах(% - по умолчанию): &amp;quot;.&lt;br /&gt;
    getTextInt(noOfRounds_S)=&amp;quot;\nВведите число партий игры (по умолчанию %):&amp;quot;.&lt;br /&gt;
    getTextInt(reportHeader_S)=&amp;quot;\nРезультаты % игр:&amp;quot;.&lt;br /&gt;
    getTextInt(playerReport_S)=&amp;quot;\nИгрок %:\n\t Всего побед % из них:\n\t\tПри ходе первым - \t%\n\t\tПри ходе следующим - \t% &amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
    getTextInt(error_S)=&amp;quot;Ошибка, % &amp;quot;.&lt;br /&gt;
    getTextInt(errorPlayerType_S)=&amp;quot;\nТакого ТИПА Игрока нет! Enter - для повторного ввода:&amp;quot;.&lt;br /&gt;
    getTextInt(errorMustBeNumber_S)=&amp;quot;\nДолжен быть номер! Повторите ввод:&amp;quot;.&lt;br /&gt;
    getTextInt(errorstartingPlayer_S)=&amp;quot;\nТакого Игрока нет! Повторите ввод:&amp;quot;.&lt;br /&gt;
    getTextInt(errorFieldSize_S)=&amp;quot;\nНеправильно указан размер игрового поля! Повторите ввод:&amp;quot;.&lt;br /&gt;
    getTextInt(errorNoOfRounds_S)=&amp;quot;\nНеправильно указано число партий! Повторите ввод:&amp;quot;.&lt;br /&gt;
    getTextInt(errorWrongCell_S)=&amp;quot;Ход % не может быть продолжением линии:&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
end implement polyLineTextRu&lt;br /&gt;
 &lt;br /&gt;
class polyLineTextEn:polyLineText&lt;br /&gt;
end class polyLineTextEn&lt;br /&gt;
 &lt;br /&gt;
implement polyLineTextEn&lt;br /&gt;
open core, humanInterface&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    getText(TextID)=Text:-&lt;br /&gt;
        Text=getTextInt(TextID),&lt;br /&gt;
        !.&lt;br /&gt;
    getText(_TextID)=&amp;quot;No Text Exists&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
class predicates&lt;br /&gt;
    getTextInt:(humanInterface::actionID_D TextID)-&amp;gt;string Text determ.&lt;br /&gt;
clauses&lt;br /&gt;
    getTextInt(thinker_S)=&amp;quot;% is thinking ...&amp;quot;.&lt;br /&gt;
    getTextInt(round_S)=&amp;quot;Round: %&amp;quot;.&lt;br /&gt;
    getTextInt(beginner_S)=&amp;quot;First move done by: %&amp;quot;.&lt;br /&gt;
    getTextInt(congratulation_S)=&amp;quot;Player % won!&amp;quot;.&lt;br /&gt;
    getTextInt(sorryLoss_S)=&amp;quot;%,  Sorry, you loss :-(&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
    getTextInt(singleOrMultipleChoice_S)=&amp;quot;Please choose the mode (S or Enter - single game, other - multiple):&amp;quot;.&lt;br /&gt;
    getTextInt(fieldSize_S)=&amp;quot;\nPlease enter the size of the gaimbling field X,Y (% by default):&amp;quot;.&lt;br /&gt;
    getTextInt(playerStep_S)=&amp;quot;Please enter your move as c(X,Y) or as X,Y: &amp;quot;.&lt;br /&gt;
    getTextInt(playerType_S)=&amp;quot;\nPossible player types:\n%s\nPlayer #%s. Please enter the player type (Enter - end of list):&amp;quot;.&lt;br /&gt;
    getTextInt(playerName_S)=&amp;quot;\nPlease assign the name to the player (% proposed):&amp;quot;.&lt;br /&gt;
    getTextInt(startingPlayer_S)=&amp;quot;\nWho moves the first (PlayerNo or Enter - end of the game)?:&amp;quot;.&lt;br /&gt;
    getTextInt(searchDepth_S)=&amp;quot;\nChoose the depth of the prognosis (% - by default): &amp;quot;.&lt;br /&gt;
    getTextInt(noOfRounds_S)=&amp;quot;\nPlease enter the number of games (% by default):&amp;quot;.&lt;br /&gt;
    getTextInt(reportHeader_S)=&amp;quot;\nResult of % games:&amp;quot;.&lt;br /&gt;
    getTextInt(playerReport_S)=&amp;quot;\nPlayer %:\n\t Wins Total % and:\n\t\tWhile first move - \t%\n\t\tWhile next move - \t% &amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
    getTextInt(error_S)=&amp;quot;Error, % &amp;quot;.&lt;br /&gt;
    getTextInt(errorPlayerType_S)=&amp;quot;\nNo such player type exiasts! Enter - repeat input:&amp;quot;.&lt;br /&gt;
    getTextInt(errorMustBeNumber_S)=&amp;quot;\nMust be number! Please repeat input:&amp;quot;.&lt;br /&gt;
    getTextInt(errorstartingPlayer_S)=&amp;quot;\nNo such Player exiasts! Please repeat input:&amp;quot;.&lt;br /&gt;
    getTextInt(errorFieldSize_S)=&amp;quot;\nWrong size of the field entered! Please repeat input:&amp;quot;.&lt;br /&gt;
    getTextInt(errorNoOfRounds_S)=&amp;quot;\nWrong amount of games entered! Please repeat input:&amp;quot;.&lt;br /&gt;
    getTextInt(errorWrongCell_S)=&amp;quot;The Move % doesn&amp;#039;t prolong the PolyLine:&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
end implement polyLineTextEn&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class HumanInterface&lt;br /&gt;
******************************************/&lt;br /&gt;
class humanInterface&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    actionID_D=&lt;br /&gt;
        beginner_S;&lt;br /&gt;
        thinker_S;&lt;br /&gt;
        congratulation_S;&lt;br /&gt;
        sorryLoss_S;&lt;br /&gt;
 &lt;br /&gt;
        reportHeader_S;&lt;br /&gt;
        playerReport_S;&lt;br /&gt;
        report_S;&lt;br /&gt;
 &lt;br /&gt;
        round_S;&lt;br /&gt;
        starter_S;&lt;br /&gt;
 &lt;br /&gt;
        win_S;&lt;br /&gt;
        loss_S;&lt;br /&gt;
 &lt;br /&gt;
        singleOrMultipleChoice_S;&lt;br /&gt;
        fieldSize_S;&lt;br /&gt;
        playerStep_S;&lt;br /&gt;
        playerType_S;&lt;br /&gt;
        playerName_S;&lt;br /&gt;
        startingPlayer_S;&lt;br /&gt;
        searchDepth_S;&lt;br /&gt;
        noOfRounds_S;&lt;br /&gt;
 &lt;br /&gt;
        singleOrMulti_S;&lt;br /&gt;
 &lt;br /&gt;
        error_S;&lt;br /&gt;
        errorPlayerType_S;&lt;br /&gt;
        errorMustBeNumber_S;&lt;br /&gt;
        errorstartingPlayer_S;&lt;br /&gt;
        errorFieldSize_S;&lt;br /&gt;
        errorNoOfRounds_S;&lt;br /&gt;
        errorWrongCell_S.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
   reset:().&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    announceStartUp:().&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    setLanguage:(game::language_D).&lt;br /&gt;
    waitOK:().&lt;br /&gt;
    showStage:().&lt;br /&gt;
    showStep:(juniourJudge::cell,juniourJudge::stepType_D).&lt;br /&gt;
    getInput:(actionID_D,string StringParameter)-&amp;gt;string InputString.&lt;br /&gt;
    getInput:(actionID_D)-&amp;gt;string InputString.&lt;br /&gt;
    announce:(actionID_D AnnounceID,string AnnounceText).&lt;br /&gt;
 &lt;br /&gt;
end class humanInterface&lt;br /&gt;
 &lt;br /&gt;
implement humanInterface&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;humanInterface&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    cellMarkedOrdinary_C=&amp;quot;*&amp;quot;.&lt;br /&gt;
    cellMarkedWinner_C=&amp;quot;O&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    verticalSpace_C=2.&lt;br /&gt;
    horizontalSpace_C=3.&lt;br /&gt;
    emptyLineLenght_C=80.&lt;br /&gt;
 &lt;br /&gt;
constants % Position of Line&lt;br /&gt;
    starterLine_C=1.&lt;br /&gt;
    announceLine_C=starterLine_C+1.&lt;br /&gt;
    actionLine_C=announceLine_C+1.&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    language_V:polyLineText:=erroneous.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setLanguage(Language):-&lt;br /&gt;
        if Language=game::en then&lt;br /&gt;
            language_V:=polyLineTextEn::new()&lt;br /&gt;
        else &lt;br /&gt;
            language_V:=polyLineTextRu::new()&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    getInput(InputType)=Input:-&lt;br /&gt;
        Input=getInput(InputType,&amp;quot;&amp;quot;).&lt;br /&gt;
 &lt;br /&gt;
    getInput(InputType,StringParameter)=Input:-&lt;br /&gt;
        inputInvitation(InputType,StringParameter),&lt;br /&gt;
        !,&lt;br /&gt;
        Input = console::readLine(),&lt;br /&gt;
        console::clearInput().&lt;br /&gt;
    getInput(_InputType,_StringParameter)=_Input:-&lt;br /&gt;
        common_Exception::raise_error(classInfo,predicate_Name(),&amp;quot;InternalException. Extra alternative&amp;quot;).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    inputInvitation:(actionID_D,string StringParameter) determ.&lt;br /&gt;
clauses&lt;br /&gt;
    inputInvitation(playerStep_S,_StringParameter):-&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(actionLine_C,&amp;quot;%&amp;quot;,language_V:getText(playerStep_S)).&lt;br /&gt;
    inputInvitation(playerName_S,StringParameter):-&lt;br /&gt;
        console::writef(language_V:getText(playerName_S),StringParameter).&lt;br /&gt;
    inputInvitation(playerType_S,StringParameter):-&lt;br /&gt;
        hasDomain(string,PlayersDescriptor),&lt;br /&gt;
        [PlayersDescriptor,PlayerNo]=toTerm(StringParameter),&lt;br /&gt;
        console::writef(language_V:getText(playerType_S),PlayersDescriptor,PlayerNo).&lt;br /&gt;
    inputInvitation(startingPlayer_S,StringParameter):-&lt;br /&gt;
        console::write(StringParameter,language_V:getText(startingPlayer_S)).&lt;br /&gt;
    inputInvitation(searchDepth_S,StringParameter):-&lt;br /&gt;
        console::writef(language_V:getText(searchDepth_S),StringParameter).&lt;br /&gt;
    inputInvitation(fieldSize_S,StringParameter):-&lt;br /&gt;
        console::writef(language_V:getText(fieldSize_S),StringParameter).&lt;br /&gt;
    inputInvitation(noOfRounds_S,StringParameter):-&lt;br /&gt;
        console::writef(language_V:getText(noOfRounds_S),StringParameter).&lt;br /&gt;
    inputInvitation(singleOrMulti_S,_StringParameter):-&lt;br /&gt;
        console::write(language_V:getText(singleOrMultipleChoice_S)).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    showStage():-&lt;br /&gt;
        game::multiMode_V=true,&lt;br /&gt;
        !.&lt;br /&gt;
    showStage():-&lt;br /&gt;
        console::clearOutput(),&lt;br /&gt;
        foreach I = std::fromTo(1, juniourJudge::maxColumn_P) do&lt;br /&gt;
            console::setLocation(console_native::coord(horizontalSpace_C*I, 0)), &lt;br /&gt;
            console::write(I)&lt;br /&gt;
        end foreach,&lt;br /&gt;
        foreach J = std::fromTo(1, juniourJudge::maxRow_P) do    &lt;br /&gt;
            console::setLocation(console_native::coord(0, verticalSpace_C*J)), &lt;br /&gt;
            console::write(J)&lt;br /&gt;
        end foreach.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    showStep(_Cell,_Type):-&lt;br /&gt;
        game::multiMode_V=true,&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        nextChar(char_V),&lt;br /&gt;
        !,&lt;br /&gt;
        writeMessage(actionLine_C,&amp;quot;%&amp;quot;,char_V).&lt;br /&gt;
    showStep(juniourJudge::c(X,Y),_Type):-&lt;br /&gt;
        console::setLocation(console_native::coord(horizontalSpace_C*X, verticalSpace_C*Y)),&lt;br /&gt;
        fail.&lt;br /&gt;
    showStep(_Cell,juniourJudge::ordinary_S):-&lt;br /&gt;
        console::write(cellMarkedOrdinary_C).&lt;br /&gt;
    showStep(_Cell,juniourJudge::winner_S):-&lt;br /&gt;
        console::write(cellMarkedWinner_C).&lt;br /&gt;
&lt;br /&gt;
class facts&lt;br /&gt;
    char_V:string:=&amp;quot;-&amp;quot;. % -\|/&lt;br /&gt;
class predicates&lt;br /&gt;
    nextChar:(string CharIn) determ.&lt;br /&gt;
clauses&lt;br /&gt;
    nextChar(&amp;quot;-&amp;quot;):-char_V:=&amp;quot;\\&amp;quot;.&lt;br /&gt;
    nextChar(&amp;quot;\\&amp;quot;):-char_V:=&amp;quot;|&amp;quot;.&lt;br /&gt;
    nextChar(&amp;quot;|&amp;quot;):-char_V:=&amp;quot;/&amp;quot;.&lt;br /&gt;
    nextChar(&amp;quot;/&amp;quot;):-char_V:=&amp;quot;-&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceStartUp():-&lt;br /&gt;
        reset().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announce(reportHeader_S,Parameter):-&lt;br /&gt;
        !,&lt;br /&gt;
        console::writef(language_V:getText(reportHeader_S),Parameter).&lt;br /&gt;
    announce(report_S,PlayerResultListList):-&lt;br /&gt;
        !,&lt;br /&gt;
        findAll&lt;br /&gt;
            (&lt;br /&gt;
            PlayerReport,&lt;br /&gt;
            (&lt;br /&gt;
            hasDomain(string,Name),&lt;br /&gt;
            [Name,WinsTotal,WinsFirst,WinsNext]=list::getMember_nd(toTerm(PlayerResultListList)),&lt;br /&gt;
                PlayerReport=string::format(language_V:getText(playerReport_S),Name,WinsTotal,WinsFirst,WinsNext)&lt;br /&gt;
             ),   &lt;br /&gt;
            PlayerReportList&lt;br /&gt;
            ),&lt;br /&gt;
        console::write(string::concatList(PlayerReportList)).&lt;br /&gt;
    announce(round_S,RoundString):-&lt;br /&gt;
        !,&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,language_V:getText(round_S),RoundString).&lt;br /&gt;
    announce(starter_S,Name):-&lt;br /&gt;
        !,&lt;br /&gt;
        clearMessageArea(starterLine_C),&lt;br /&gt;
        writeMessage(starterLine_C,language_V:getText(beginner_S),Name).&lt;br /&gt;
    announce(errorPlayerType_S,_IgnoredText):-&lt;br /&gt;
        !,&lt;br /&gt;
        console::write(language_V:getText(errorPlayerType_S)),&lt;br /&gt;
        _=console::readLine().&lt;br /&gt;
    announce(errorMustBeNumber_S,_IgnoredText):-&lt;br /&gt;
        !,&lt;br /&gt;
        console::write(language_V:getText(errorMustBeNumber_S)).&lt;br /&gt;
    announce(errorStartingPlayer_S,_IgnoredText):-&lt;br /&gt;
        !,&lt;br /&gt;
        console::write(language_V:getText(errorStartingPlayer_S)).&lt;br /&gt;
    announce(errorFieldSize_S,_IgnoredText):-&lt;br /&gt;
        !,&lt;br /&gt;
        console::write(language_V:getText(errorFieldSize_S)).&lt;br /&gt;
    announce(errorNoOfRounds_S,_IgnoredText):-&lt;br /&gt;
        !,&lt;br /&gt;
        console::write(language_V:getText(errorNoOfRounds_S)).&lt;br /&gt;
    announce(error_S,ErrorText):-&lt;br /&gt;
        !,&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,language_V:getText(error_S),ErrorText).&lt;br /&gt;
    announce(errorWrongCell_S,InvalidData):-&lt;br /&gt;
        !,&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,language_V:getText(errorWrongCell_S),InvalidData).&lt;br /&gt;
    announce(win_S,Name):-&lt;br /&gt;
        !,&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,language_V:getText(congratulation_S),Name),&lt;br /&gt;
        _ = console::readLine().&lt;br /&gt;
    announce(loss_S,Name):-&lt;br /&gt;
        !,&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,language_V:getText(sorryLoss_S),Name),&lt;br /&gt;
        _ = console::readLine().&lt;br /&gt;
    announce(thinker_S,_Name):-&lt;br /&gt;
        game::multiMode_V=true,&lt;br /&gt;
        !.&lt;br /&gt;
    announce(thinker_S,Name):-&lt;br /&gt;
        !,&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(actionLine_C,language_V:getText(thinker_S),Name).&lt;br /&gt;
    announce(_Any,_Name):-&lt;br /&gt;
        common_Exception::raise_error(classInfo,predicate_Name(),&amp;quot;InternalException. Extra alternative&amp;quot;).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    waitOK():-&lt;br /&gt;
        _=console::readLine().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    reset():-&lt;br /&gt;
        console::setLocation(console_native::coord(0,0)),&lt;br /&gt;
        console::write(string::create(1600,&amp;quot; &amp;quot;)),&lt;br /&gt;
        console::clearOutput().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    clearMessageArea:(positive AreaID).&lt;br /&gt;
clauses&lt;br /&gt;
    clearMessageArea(AreaID):-&lt;br /&gt;
        console::setLocation(console_native::coord(0,juniourJudge::maxRow_P*verticalSpace_C+AreaID)),&lt;br /&gt;
        console::write(string::create(emptyLineLenght_C,&amp;quot; &amp;quot;)).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    writeMessage:(positive AreaID,string FormatString,string ParameterString).&lt;br /&gt;
clauses&lt;br /&gt;
    writeMessage(AreaID,FormatString,ParameterString):-&lt;br /&gt;
        console::setLocation(console_native::coord(0, juniourJudge::maxRow_P*verticalSpace_C+AreaID)),&lt;br /&gt;
        console::writef(FormatString,ParameterString).&lt;br /&gt;
 &lt;br /&gt;
end implement humanInterface&lt;br /&gt;
 &lt;br /&gt;
/******************&lt;br /&gt;
  Class Competitors&lt;br /&gt;
******************/&lt;br /&gt;
class competitors&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    involvePlayers:().&lt;br /&gt;
 &lt;br /&gt;
end class competitors&lt;br /&gt;
 &lt;br /&gt;
implement competitors&lt;br /&gt;
open core&lt;br /&gt;
clauses&lt;br /&gt;
    involvePlayers():-&lt;br /&gt;
        involvePlayers(1).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    involvePlayers:(positive PlayerNo).&lt;br /&gt;
clauses&lt;br /&gt;
    involvePlayers(PlayerNo):-&lt;br /&gt;
        humanInterface::announceStartUp(),&lt;br /&gt;
        findAll&lt;br /&gt;
            (&lt;br /&gt;
            PlayerDescriptor,&lt;br /&gt;
            (&lt;br /&gt;
                playerDescriptor(No,PlayerDescriptorSrc),&lt;br /&gt;
                PlayerDescriptor=string::format(&amp;quot;% - %\n&amp;quot;,No,PlayerDescriptorSrc)&lt;br /&gt;
            ),&lt;br /&gt;
            PlayerDescriptorList&lt;br /&gt;
            ),&lt;br /&gt;
        PlayersDescriptor=string::concatList(PlayerDescriptorList),&lt;br /&gt;
        PlayerType=humanInterface::getInput(humanInterface::playerType_S,toString([PlayersDescriptor,toString(PlayerNo)])),&lt;br /&gt;
        not(PlayerType=&amp;quot;&amp;quot;),&lt;br /&gt;
        try&lt;br /&gt;
            Player=createPlayerObject(toTerm(PlayerType)),&lt;br /&gt;
            Player:setName(toString(PlayerNo)),&lt;br /&gt;
            game::addPlayer(Player),&lt;br /&gt;
            NewPlayerNo=PlayerNo+1&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            humanInterface::announce(humanInterface::errorPlayerType_S,&amp;quot;&amp;quot;),&lt;br /&gt;
            NewPlayerNo=PlayerNo&lt;br /&gt;
        end try,&lt;br /&gt;
        !,&lt;br /&gt;
        involvePlayers(NewPlayerNo).&lt;br /&gt;
    involvePlayers(_PlayerNo).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    wrongInputException:exception.&lt;br /&gt;
clauses&lt;br /&gt;
    wrongInputException&lt;br /&gt;
        (&lt;br /&gt;
        classInfo,&lt;br /&gt;
        predicate_Name(),&lt;br /&gt;
        &amp;quot;&amp;quot;&lt;br /&gt;
        ).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    playerDescriptor:(positive No [out],string PlayerDescriptorSrc [out]) multi.&lt;br /&gt;
clauses&lt;br /&gt;
    playerDescriptor(1,human::getPlayerDescriptor(game::language_V)).&lt;br /&gt;
    playerDescriptor(2,computer0::getPlayerDescriptor(game::language_V)).&lt;br /&gt;
    playerDescriptor(3,computer1::getPlayerDescriptor(game::language_V)).&lt;br /&gt;
    playerDescriptor(4,computer2::getPlayerDescriptor(game::language_V)).&lt;br /&gt;
/*Include here lines corresponding to the Player Class*/&lt;br /&gt;
%    playerDescriptor(5,computer3::getPlayerDescriptor(game::language_V)).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    createPlayerObject:(positive)-&amp;gt;player.&lt;br /&gt;
clauses&lt;br /&gt;
    createPlayerObject(1)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=human::new().&lt;br /&gt;
   createPlayerObject(2)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=computer0::new().&lt;br /&gt;
   createPlayerObject(3)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=computer1::new().&lt;br /&gt;
    createPlayerObject(4)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=computer2::new().&lt;br /&gt;
/*Include here lines corresponding to the Player Class*/&lt;br /&gt;
/*&lt;br /&gt;
    createPlayerObject(5)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=computer3::new().&lt;br /&gt;
*/&lt;br /&gt;
    createPlayerObject(_)=_Player:-&lt;br /&gt;
        exception::raise(classInfo,wrongInputException,[]).&lt;br /&gt;
 &lt;br /&gt;
end implement competitors&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 7]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_6&amp;diff=2568</id>
		<title>Tutorial Project. Release 6</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_6&amp;diff=2568"/>
		<updated>2011-04-01T13:38:36Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal=Demonstrating the properties of Visual Prolog language and simple programming techniques.&lt;br /&gt;
|goalContent=&lt;br /&gt;
|code=&lt;br /&gt;
*The code is modified to support the new functionality.&lt;br /&gt;
|functionality=&lt;br /&gt;
*The size of the board can be defined;&lt;br /&gt;
*Multiple games mode (recommended for computer models only);&lt;br /&gt;
*It is possible to create many players, each player with the own strategy:&lt;br /&gt;
**Human (it is not recommended to use in multiple games mode);&lt;br /&gt;
**Computer 1 with the full search (the same as in releases 2,3,4) (not recommended for multiple games);&lt;br /&gt;
**Computer 2 with the easy strategy with the prognosis on K moves forward (the same as in release 5);&lt;br /&gt;
*An easy inclusion of new players.&lt;br /&gt;
|install={{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
{{Polyline1_10Open|project=&amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline6\Polyline6.prj&amp;#039;&amp;#039;&amp;#039;}}&lt;br /&gt;
&lt;br /&gt;
{{Polyline1-06Copy_Paste}}&lt;br /&gt;
|run=Run the application using the “E” of the IDE or run the executable at the directory EXE.&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
/****************************************************&lt;br /&gt;
Written by Victor Yukhtenko&lt;br /&gt;
&lt;br /&gt;
SpbSolutions/Examples/Polyline&lt;br /&gt;
 &lt;br /&gt;
Predicates, which represent the strategy&lt;br /&gt;
    neighbour_nd,&lt;br /&gt;
    neighbourOutOfPolyLine_nd,&lt;br /&gt;
    stepCandidate&lt;br /&gt;
based on solutions proposed by Elena Efimova&lt;br /&gt;
Predidcates&lt;br /&gt;
    successfulStep&lt;br /&gt;
modified&lt;br /&gt;
*****************************************************/&lt;br /&gt;
/*****************&lt;br /&gt;
  GOAL&lt;br /&gt;
*****************/&lt;br /&gt;
goal&lt;br /&gt;
    mainExe::run(main::run).&lt;br /&gt;
 &lt;br /&gt;
/**************&lt;br /&gt;
 Class Main&lt;br /&gt;
**************/&lt;br /&gt;
implement main&lt;br /&gt;
    open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;main&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.6&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    run():-&lt;br /&gt;
        console::init(),   &lt;br /&gt;
        game::run().&lt;br /&gt;
 &lt;br /&gt;
end implement main&lt;br /&gt;
 &lt;br /&gt;
class game&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    players_V:player*.&lt;br /&gt;
    multiMode_V:boolean.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    run:().&lt;br /&gt;
end class game&lt;br /&gt;
 &lt;br /&gt;
implement game&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;game&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    multiMode_V:boolean:=false.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    run():-&lt;br /&gt;
        Mode=chooseSingleOrMultiGame(),&lt;br /&gt;
        setGameProperties(),&lt;br /&gt;
        involvePlayers(),&lt;br /&gt;
        if Mode=single_S then &lt;br /&gt;
            playSingle()&lt;br /&gt;
        else&lt;br /&gt;
            multiMode_V:=true,&lt;br /&gt;
            seniourJudge::playMulti()&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    mode_D=&lt;br /&gt;
        single_S;&lt;br /&gt;
        multi_S.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    chooseSingleOrMultiGame:()-&amp;gt;mode_D GameOrCompetition.&lt;br /&gt;
clauses&lt;br /&gt;
    chooseSingleOrMultiGame()=Choice:-&lt;br /&gt;
        ChoiceStr=humanInterface::getInput(humanInterface::singleOrMulti_S),&lt;br /&gt;
        if (string::equalIgnoreCase(ChoiceStr,&amp;quot;S&amp;quot;) or ChoiceStr=&amp;quot;&amp;quot;),! then&lt;br /&gt;
            Choice=single_S,&lt;br /&gt;
            !&lt;br /&gt;
        else&lt;br /&gt;
            Choice=multi_S&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    playSingle:().&lt;br /&gt;
clauses&lt;br /&gt;
    playSingle():-&lt;br /&gt;
        StartingPlayer=chooseStartingPlayer(),&lt;br /&gt;
        seniourJudge::playSingle(StartingPlayer),&lt;br /&gt;
        !,&lt;br /&gt;
        playSingle().&lt;br /&gt;
    playSingle().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    setGameProperties:().&lt;br /&gt;
clauses&lt;br /&gt;
    setGameProperties():-&lt;br /&gt;
        juniourJudge::defineStage().&lt;br /&gt;
 &lt;br /&gt;
/***************************&lt;br /&gt;
 Involving Players&lt;br /&gt;
***************************/&lt;br /&gt;
class facts&lt;br /&gt;
    players_V:player*:=[].&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    involvePlayers:().&lt;br /&gt;
clauses&lt;br /&gt;
    involvePlayers():-&lt;br /&gt;
        createPlayers(1).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    createPlayers:(positive PlayerNo).&lt;br /&gt;
clauses&lt;br /&gt;
    createPlayers(PlayerNo):-&lt;br /&gt;
        humanInterface::announceStartUp(),&lt;br /&gt;
        findAll&lt;br /&gt;
            (&lt;br /&gt;
            PlayerDescriptor,&lt;br /&gt;
            (&lt;br /&gt;
                playerDescriptor(No,PlayerDescriptorSrc),&lt;br /&gt;
                PlayerDescriptor=string::format(&amp;quot;% - %\n&amp;quot;,No,PlayerDescriptorSrc)&lt;br /&gt;
            ),&lt;br /&gt;
            PlayerDescriptorList&lt;br /&gt;
            ),&lt;br /&gt;
        PlayersDescriptor=string::concatList(PlayerDescriptorList),&lt;br /&gt;
        PlayerType=humanInterface::getInput&lt;br /&gt;
            (&lt;br /&gt;
            humanInterface::playerType_S,&lt;br /&gt;
            string::format(&amp;quot;Possible types of players:\n%s\nPlayer #%s&amp;quot;,PlayersDescriptor,toString(PlayerNo))&lt;br /&gt;
            ),&lt;br /&gt;
        not(PlayerType=&amp;quot;&amp;quot;),&lt;br /&gt;
        try&lt;br /&gt;
            Player=createPlayerObject(toTerm(PlayerType)),&lt;br /&gt;
            Player:setName(toString(PlayerNo)),&lt;br /&gt;
            players_V:=list::append(players_V,[Player]),&lt;br /&gt;
            NewPlayerNo=PlayerNo+1&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            humanInterface::announceSettingsError(humanInterface::errorPlayerType_S),&lt;br /&gt;
            NewPlayerNo=PlayerNo&lt;br /&gt;
        end try,&lt;br /&gt;
        !,&lt;br /&gt;
        createPlayers(NewPlayerNo).&lt;br /&gt;
    createPlayers(_PlayerNo).&lt;br /&gt;
 &lt;br /&gt;
/* Potential Players List*/ &lt;br /&gt;
class predicates&lt;br /&gt;
    playerDescriptor:(positive No [out],string PlayerDescriptorSrc [out]) multi.&lt;br /&gt;
clauses&lt;br /&gt;
    playerDescriptor(1,human::playerDescriptor_C).&lt;br /&gt;
    playerDescriptor(2,computer1::playerDescriptor_C).&lt;br /&gt;
    playerDescriptor(3,computer2::playerDescriptor_C).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    createPlayerObject:(positive)-&amp;gt;player.&lt;br /&gt;
clauses&lt;br /&gt;
    createPlayerObject(1)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=human::new().&lt;br /&gt;
    createPlayerObject(2)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=computer1::new().&lt;br /&gt;
    createPlayerObject(3)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=computer2::new().&lt;br /&gt;
    createPlayerObject(_)=_Player:-&lt;br /&gt;
        exception::raise(classInfo,wrongInputException,[]).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    wrongInputException:exception.&lt;br /&gt;
clauses&lt;br /&gt;
    wrongInputException&lt;br /&gt;
        (&lt;br /&gt;
        classInfo,&lt;br /&gt;
        predicate_Name(),&lt;br /&gt;
        &amp;quot;&amp;quot;&lt;br /&gt;
        ).&lt;br /&gt;
 &lt;br /&gt;
/***************************&lt;br /&gt;
 Shoose Starting Player&lt;br /&gt;
***************************/&lt;br /&gt;
class predicates&lt;br /&gt;
    chooseStartingPlayer:()-&amp;gt;player determ.&lt;br /&gt;
clauses&lt;br /&gt;
    chooseStartingPlayer()=Player:-&lt;br /&gt;
        not(players_V=[]) and not(players_V=[_SiglePlayer]),&lt;br /&gt;
        findAll(PlayListMember,PlayListMember=playListMember(),PlayList),&lt;br /&gt;
        PlayListStr=string::concatList(PlayList),&lt;br /&gt;
        StartingPlayer=getStartingPlayerInput(PlayListStr),&lt;br /&gt;
        Player=list::nth(StartingPlayer-1,players_V).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    playListMember:()-&amp;gt;string nondeterm.&lt;br /&gt;
clauses&lt;br /&gt;
    playListMember()=PlayersListMember:-&lt;br /&gt;
        I = std::fromTo(1, list::length(game::players_V)),&lt;br /&gt;
            Player=list::nth(I-1,game::players_V),&lt;br /&gt;
            PlayersListMember=string::format(&amp;quot;\n% - %&amp;quot;,I,Player:name).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    getStartingPlayerInput:(string PlayListStr)-&amp;gt;positive StartingPlayerNo determ.&lt;br /&gt;
clauses&lt;br /&gt;
    getStartingPlayerInput(PlayListStr)=StartingPlayer:-&lt;br /&gt;
        StartingPlayerStr=humanInterface::getInput(humanInterface::startingPlayer_S,PlayListStr),&lt;br /&gt;
        if StartingPlayerStr=&amp;quot;&amp;quot; then&lt;br /&gt;
            !,&lt;br /&gt;
            fail&lt;br /&gt;
        else&lt;br /&gt;
            try&lt;br /&gt;
                StartingPlayer=toTerm(StartingPlayerStr),&lt;br /&gt;
                !&lt;br /&gt;
            catch _TraceID1 do&lt;br /&gt;
                humanInterface::announceSettingsError(humanInterface::errorMustBeNumber_S),&lt;br /&gt;
                fail&lt;br /&gt;
            end try,&lt;br /&gt;
            if StartingPlayer&amp;gt;list::length(players_V) then&lt;br /&gt;
                humanInterface::announceSettingsError(humanInterface::errorStartingPlayer_S),&lt;br /&gt;
                fail&lt;br /&gt;
            end if&lt;br /&gt;
        end if.&lt;br /&gt;
    getStartingPlayerInput(PlayListStr)=StartingPlayer:-&lt;br /&gt;
        StartingPlayer=getStartingPlayerInput(PlayListStr).&lt;br /&gt;
 &lt;br /&gt;
end implement game&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Class seniorJudge&lt;br /&gt;
************************/&lt;br /&gt;
class seniourJudge&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    inProgress_V:boolean.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    playSingle:(player CurrentPlayer).&lt;br /&gt;
    playMulti:().&lt;br /&gt;
 &lt;br /&gt;
end class seniourJudge&lt;br /&gt;
 &lt;br /&gt;
implement seniourJudge&lt;br /&gt;
open core, humanInterface&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    inProgress_V:boolean:=false.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    playSingle(Player):-&lt;br /&gt;
        inProgress_V=false,&lt;br /&gt;
        if game::multiMode_V=false then&lt;br /&gt;
            humanInterface::showStage(),&lt;br /&gt;
            humanInterface::announceStarter(Player:name)&lt;br /&gt;
        end if,&lt;br /&gt;
        inProgress_V:=true,&lt;br /&gt;
        Player:move(),&lt;br /&gt;
        playSingle(Player),&lt;br /&gt;
        !.&lt;br /&gt;
    playSingle(Player):-&lt;br /&gt;
        juniourJudge::isGameOver(),&lt;br /&gt;
        !,&lt;br /&gt;
        if game::multiMode_V=false then&lt;br /&gt;
            Player:announceWin(),&lt;br /&gt;
            foreach (Participant=list::getMember_nd(game::players_V) and not(Participant=Player)) do&lt;br /&gt;
                Participant:announceLoss()&lt;br /&gt;
            end foreach&lt;br /&gt;
        else&lt;br /&gt;
            addWinner(Player)&lt;br /&gt;
        end if,&lt;br /&gt;
        inProgress_V:=false,&lt;br /&gt;
        juniourJudge::reset().&lt;br /&gt;
    playSingle(Player):-&lt;br /&gt;
        NextPlayer=nextPlayer(Player),&lt;br /&gt;
        NextPlayer:move(),&lt;br /&gt;
        !,&lt;br /&gt;
        playSingle(NextPlayer).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    nextPlayer:(player CurrentPlayer)-&amp;gt;player NextPlayer.&lt;br /&gt;
clauses&lt;br /&gt;
    nextPlayer(Player)=NextPlayer:-&lt;br /&gt;
        Index=list::tryGetIndex(Player,game::players_V),&lt;br /&gt;
        NextPlayer=list::tryGetNth(Index+1,game::players_V),&lt;br /&gt;
        !.&lt;br /&gt;
    nextPlayer(_Player)=list::nth(0,game::players_V).&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Multi Mode Handle&lt;br /&gt;
************************/&lt;br /&gt;
class predicates&lt;br /&gt;
    defineNoOfRounds:().&lt;br /&gt;
clauses&lt;br /&gt;
    defineNoOfRounds():-&lt;br /&gt;
        InputString=humanInterface::getInput(humanInterface::noOfRounds_S,toString(noOfRounds_V)),&lt;br /&gt;
        not(InputString=&amp;quot;&amp;quot;),&lt;br /&gt;
        try&lt;br /&gt;
            noOfRounds_V:=toTerm(InputString)&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            humanInterface::announceSettingsError(humanInterface::errorNoOfRounds_S),&lt;br /&gt;
            defineNoOfRounds()&lt;br /&gt;
        end try,&lt;br /&gt;
        !.&lt;br /&gt;
    defineNoOfRounds().&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    starter_V:player:=erroneous.&lt;br /&gt;
    noOfRounds_V:positive:=10.&lt;br /&gt;
    statistics_F:(boolean TrueIfWon,player,positive Won).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    playMulti():-&lt;br /&gt;
        defineNoOfRounds(),&lt;br /&gt;
        Player=list::getMember_nd(game::players_V),&lt;br /&gt;
            starter_V:=Player,&lt;br /&gt;
            playRound(noOfRounds_V),&lt;br /&gt;
        fail().&lt;br /&gt;
    playMulti():-&lt;br /&gt;
        humanInterface::reset(),&lt;br /&gt;
        PlayersNo=list::length(game::players_V),&lt;br /&gt;
        humanInterface::announce&lt;br /&gt;
            (&lt;br /&gt;
            humanInterface::report_S,&lt;br /&gt;
            string::format(&amp;quot;\nResults of % games:&amp;quot;,toString(PlayersNo*noOfRounds_V))&lt;br /&gt;
            ),&lt;br /&gt;
        Player=list::getMember_nd(game::players_V),&lt;br /&gt;
            PlayerWinsFirst=calculateWins(Player,true),&lt;br /&gt;
            PlayerWinsNext=calculateWins(Player,false),&lt;br /&gt;
            Report=string::format&lt;br /&gt;
                (&lt;br /&gt;
                &amp;quot;\nPlayer %:\n\t Wins Total % including:\n\t\tWhile moving first - \t%\n\t\tWhile moving next - \t% &amp;quot;,&lt;br /&gt;
                Player:name,&lt;br /&gt;
                toString(PlayerWinsFirst+PlayerWinsNext),&lt;br /&gt;
                toString(PlayerWinsFirst),&lt;br /&gt;
                toString(PlayerWinsNext)&lt;br /&gt;
                ),&lt;br /&gt;
            humanInterface::announce(humanInterface::report_S,Report),&lt;br /&gt;
        fail().&lt;br /&gt;
    playMulti():-&lt;br /&gt;
        humanInterface::waitOK().&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    wins_V:integer:=0.&lt;br /&gt;
class predicates&lt;br /&gt;
    calculateWins:(player Player,boolean TrueIfFirst)-&amp;gt;integer Sum.&lt;br /&gt;
clauses&lt;br /&gt;
    calculateWins(Player,TrueIfFirst)=_:-&lt;br /&gt;
        wins_V:=0,&lt;br /&gt;
        statistics_F(TrueIfFirst,Player,Won),&lt;br /&gt;
            trap(wins_V:=wins_V+Won,_TraceID,fail),&lt;br /&gt;
        fail.&lt;br /&gt;
    calculateWins(_Player,_TrueIfFirst)=wins_V.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    playRound:(positive NoOfRounds).&lt;br /&gt;
clauses&lt;br /&gt;
    playRound(0):-!.&lt;br /&gt;
    playRound(NoOfRounds):-&lt;br /&gt;
        seniourJudge::playSingle(starter_V),&lt;br /&gt;
        playRound(NoOfRounds-1).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    addWinner:(player).&lt;br /&gt;
clauses&lt;br /&gt;
    addWinner(Player):-&lt;br /&gt;
        if Player=starter_V then &lt;br /&gt;
            TrueIfStarted=true &lt;br /&gt;
        else&lt;br /&gt;
            TrueIfStarted=false &lt;br /&gt;
        end if,&lt;br /&gt;
        addWinner(TrueIfStarted,Player).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    addWinner:(boolean TrueIfStarted,player Player).&lt;br /&gt;
clauses&lt;br /&gt;
    addWinner(TrueIfStarted,Player):-&lt;br /&gt;
        retract(statistics_F(TrueIfStarted,Player,Won)),&lt;br /&gt;
        !,&lt;br /&gt;
        assert(statistics_F(TrueIfStarted,Player,Won+1)).&lt;br /&gt;
    addWinner(TrueIfStarted,Player):-&lt;br /&gt;
        assert(statistics_F(TrueIfStarted,Player,1)).&lt;br /&gt;
 &lt;br /&gt;
end implement seniourJudge&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Class juniourJudge&lt;br /&gt;
************************/&lt;br /&gt;
class juniourJudge&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    cell = c(positive,positive).&lt;br /&gt;
    stepType_D=&lt;br /&gt;
        ordinary_S;&lt;br /&gt;
        winner_S.&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    maxRow_P:positive.&lt;br /&gt;
    maxColumn_P:positive.&lt;br /&gt;
    polyline_P:cell*.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    defineStage:().&lt;br /&gt;
    neighbour_nd: (cell,cell) nondeterm (i,o) (i,i).&lt;br /&gt;
    neighbourOutOfPolyLine_nd:(cell,cell)-&amp;gt;cell nondeterm.&lt;br /&gt;
    set: (string ).&lt;br /&gt;
    isGameOver:() determ.&lt;br /&gt;
    reset:().&lt;br /&gt;
 &lt;br /&gt;
end class juniourJudge&lt;br /&gt;
 &lt;br /&gt;
implement juniourJudge&lt;br /&gt;
open core, humanInterface&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;JuniourJudge&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    maxRow_P:positive:=6.&lt;br /&gt;
    maxColumn_P:positive:=6.&lt;br /&gt;
    polyline_P:cell*:=[].&lt;br /&gt;
    endOfGame_V:boolean:=false.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    fieldSize_D=tableSize(positive X,positive Y).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    defineStage():-&lt;br /&gt;
        defineFieldSize().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    defineFieldSize:().&lt;br /&gt;
clauses&lt;br /&gt;
    defineFieldSize():-&lt;br /&gt;
        InputString=humanInterface::getInput&lt;br /&gt;
            (&lt;br /&gt;
            humanInterface::fieldSize_S,&lt;br /&gt;
            string::format(&amp;quot;%s,%s&amp;quot;,toString(maxColumn_P),toString(maxRow_P))&lt;br /&gt;
            ),&lt;br /&gt;
        not(InputString=&amp;quot;&amp;quot;),&lt;br /&gt;
        try&lt;br /&gt;
            hasDomain(fieldSize_D,FieldSize),&lt;br /&gt;
            FieldSize=toTerm(string::format(&amp;quot;tableSize(%s)&amp;quot;,InputString)),&lt;br /&gt;
            FieldSize=tableSize(X,Y),&lt;br /&gt;
            maxColumn_P:=X,&lt;br /&gt;
            maxRow_P:=Y&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            humanInterface::announceSettingsError(humanInterface::errorFieldSize_S),&lt;br /&gt;
            defineFieldSize()&lt;br /&gt;
        end try,&lt;br /&gt;
        !.&lt;br /&gt;
    defineFieldSize().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    isGameOver():-&lt;br /&gt;
        endOfGame_V=true.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    set(InputString):-&lt;br /&gt;
        Cell=toTerm(InputString),&lt;br /&gt;
        handleInput (Cell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    reset():-&lt;br /&gt;
        juniourJudge:: polyline_P:=[],&lt;br /&gt;
        juniourJudge::endOfGame_V:=false.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    handleInput:(juniourJudge::cell).&lt;br /&gt;
clauses&lt;br /&gt;
    handleInput(Cell):-&lt;br /&gt;
        list::isMember(Cell,polyline_P),&lt;br /&gt;
        try &lt;br /&gt;
            _=makePolyLine(Cell,polyline_P)   % it will be an exception if wrong Cell,&lt;br /&gt;
                                                            % but we ignore it by failing&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            fail&lt;br /&gt;
        end try,&lt;br /&gt;
        !,&lt;br /&gt;
        endOfGame_V:=true,&lt;br /&gt;
        humanInterface::showStep(Cell,winner_S).&lt;br /&gt;
    handleInput (Cell):-&lt;br /&gt;
        polyline_P:=makePolyLine(Cell,polyline_P),&lt;br /&gt;
        !,&lt;br /&gt;
        if game::multiMode_V=false then&lt;br /&gt;
            humanInterface::showStep(Cell,ordinary_S)&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    makePolyLine: (cell,cell*)-&amp;gt; cell* multi.&lt;br /&gt;
clauses&lt;br /&gt;
    makePolyLine(c(X,Y),[])=[c(X,Y)]:-&lt;br /&gt;
        X&amp;gt;0,X&amp;lt;=maxColumn_P,&lt;br /&gt;
        Y&amp;gt;0,Y&amp;lt;=maxRow_P,&lt;br /&gt;
        !.&lt;br /&gt;
    makePolyLine(NewCell,[SingleCell])=[NewCell,SingleCell]:-&lt;br /&gt;
        neighbour_nd(SingleCell, NewCell),&lt;br /&gt;
        !.&lt;br /&gt;
    makePolyLine(NewCell,[Left, RestrictingCell | PolyLineTail])=[NewCell, Left, RestrictingCell | PolyLineTail]:-&lt;br /&gt;
        NewCell=neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    makePolyLine(NewCell,PolyLine)=list::reverse([NewCell,Left, RestrictingCell | PolyLineTail]):-&lt;br /&gt;
        [Left, RestrictingCell | PolyLineTail]= list::reverse(PolyLine),&lt;br /&gt;
        NewCell=neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    makePolyLine(NewCell,_PolyLine)= _PolyLine1:-&lt;br /&gt;
        exception::raise(classInfo,wrongStepException,[namedValue(&amp;quot;data&amp;quot;,string(toString(NewCell)))]).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    wrongStepException:exception.&lt;br /&gt;
clauses&lt;br /&gt;
    wrongStepException&lt;br /&gt;
        (&lt;br /&gt;
        classInfo,&lt;br /&gt;
        predicate_Name(),&lt;br /&gt;
        &amp;quot;the point % can not prolong the polyline!&amp;quot;&lt;br /&gt;
        ).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    neighbourOutOfPolyLine_nd(Cell,RestrictingCell)=NewCell:-&lt;br /&gt;
        neighbour_nd(Cell,NewCell),&lt;br /&gt;
            not(NewCell = RestrictingCell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    neighbour_nd(c(X, Y), c(X + 1, Y)):- X &amp;lt; maxColumn_P.        &lt;br /&gt;
    neighbour_nd(c(X, Y), c(X, Y + 1)):- Y &amp;lt; maxrow_P.            &lt;br /&gt;
    neighbour_nd(c(X, Y), c(X - 1, Y)):- X &amp;gt; 1.&lt;br /&gt;
    neighbour_nd(c(X, Y), c(X, Y - 1)):- Y &amp;gt; 1.    &lt;br /&gt;
 &lt;br /&gt;
end implement juniourJudge&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Interface Player&lt;br /&gt;
******************************************/&lt;br /&gt;
interface player&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    setName:(string).&lt;br /&gt;
    move:().&lt;br /&gt;
    announceWin:().&lt;br /&gt;
    announceLoss:().&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    name:string.&lt;br /&gt;
 &lt;br /&gt;
end interface player&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class HumanInterface&lt;br /&gt;
******************************************/&lt;br /&gt;
class humanInterface&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
   reset:().&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    announceStartUp:().&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    waitOK:().&lt;br /&gt;
    showStage:().&lt;br /&gt;
    showStep:(juniourJudge::cell,juniourJudge::stepType_D).&lt;br /&gt;
    getInput:(inputType_D,string StringParameter)-&amp;gt;string InputString.&lt;br /&gt;
    getInput:(inputType_D)-&amp;gt;string InputString.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    announceSettingsError:(choiceError_D).&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    announce:(announceID_D AnnounceID,string AnnounceText).&lt;br /&gt;
    announceStarter:(string Name).&lt;br /&gt;
    announceThinker:(string Name).&lt;br /&gt;
    announceWin:(string Name).&lt;br /&gt;
    announceLoss:(string Name).&lt;br /&gt;
    announceError:(string Description).&lt;br /&gt;
    announceError:().&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    announceID_D=&lt;br /&gt;
        report_S;&lt;br /&gt;
        starter_S.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    choiceError_D=&lt;br /&gt;
        errorPlayerType_S;&lt;br /&gt;
        errorMustBeNumber_S;&lt;br /&gt;
        errorstartingPlayer_S;&lt;br /&gt;
        errorFieldSize_S;&lt;br /&gt;
        errorNoOfRounds_S.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    inputType_D=&lt;br /&gt;
        fieldSize_S;&lt;br /&gt;
        playerStep_S;&lt;br /&gt;
        playerType_S;&lt;br /&gt;
        playerName_S;&lt;br /&gt;
        startingPlayer_S;&lt;br /&gt;
        searchDepth_S;&lt;br /&gt;
        noOfRounds_S;&lt;br /&gt;
        singleOrMulti_S.&lt;br /&gt;
 &lt;br /&gt;
end class humanInterface&lt;br /&gt;
 &lt;br /&gt;
implement humanInterface&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    cellMarkedOrdinary_C=&amp;quot;*&amp;quot;.&lt;br /&gt;
    cellMarkedWinner_C=&amp;quot;O&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
constants % messages&lt;br /&gt;
    thinker_C=&amp;quot;% is thinking ...&amp;quot;.&lt;br /&gt;
    beginner_C=&amp;quot;First move done by: %&amp;quot;.&lt;br /&gt;
    error_C=&amp;quot;Error, % &amp;quot;.&lt;br /&gt;
    congratulation_C=&amp;quot;Player % won!&amp;quot;.&lt;br /&gt;
    sorryLoss_C=&amp;quot;%,  Sorry, you loss :-(&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
    gameOrCompetition_C=&amp;quot;Please choose the mode (S or Enter - single game, other - multiple):&amp;quot;.&lt;br /&gt;
    fieldSize_C=&amp;quot;\nPlease enter the size of the board X,Y (% by default):&amp;quot;.&lt;br /&gt;
    playerStep_C=&amp;quot;Please enter your move as c(X,Y):&amp;quot;.&lt;br /&gt;
    playerType_C=&amp;quot;\n%. Please enter the player type (Enter - end of list):&amp;quot;.&lt;br /&gt;
    playerName_C=&amp;quot;\nPlease assign the name to the player (% proposed):&amp;quot;.&lt;br /&gt;
    startingPlayer_C=&amp;quot;\nWho moves the first (PlayerNo or Enter - end of the game)?:&amp;quot;.&lt;br /&gt;
    searchDepth_C=&amp;quot;\nChoose the depth of the prognosis (% - by default): &amp;quot;.&lt;br /&gt;
    noOfRounds_C=&amp;quot;\nPlease enter the number of rounds (% by default):&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
    errorPlayerType_C=&amp;quot;\nNo such player type exiasts! Enter - repeat input:&amp;quot;.&lt;br /&gt;
    errorMustBeNumber_C=&amp;quot;\nMust be number! Please repeat input:&amp;quot;.&lt;br /&gt;
    errorstartingPlayer_C=&amp;quot;\nNo such Player exiasts! Please repeat input:&amp;quot;.&lt;br /&gt;
    errorFieldSize_C=&amp;quot;\nWrong size of the board entered! Please repeat input:&amp;quot;.&lt;br /&gt;
    errorNoOfRounds_C=&amp;quot;\nWrong amount of rounds entered! Please repeat input:&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    verticalSpace_C=2.&lt;br /&gt;
    horizontalSpace_C=3.&lt;br /&gt;
    emptyLineLenght_C=80.&lt;br /&gt;
 &lt;br /&gt;
constants % Position of Line&lt;br /&gt;
    starterLine_C=1.&lt;br /&gt;
    announceLine_C=starterLine_C+1.&lt;br /&gt;
    actionLine_C=announceLine_C+1.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    getInput(InputType)=Input:-&lt;br /&gt;
        Input=getInput(InputType,&amp;quot;&amp;quot;).&lt;br /&gt;
 &lt;br /&gt;
    getInput(InputType,StringParameter)=Input:-&lt;br /&gt;
        inputInvitation(InputType,StringParameter),&lt;br /&gt;
        Input = console::readLine(),&lt;br /&gt;
        console::clearInput().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    inputInvitation:(inputType_D,string StringParameter).&lt;br /&gt;
clauses&lt;br /&gt;
    inputInvitation(playerStep_S,_StringParameter):-&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(actionLine_C,&amp;quot;%&amp;quot;,playerStep_C).&lt;br /&gt;
    inputInvitation(playerName_S,StringParameter):-&lt;br /&gt;
        console::writef(playerName_C,StringParameter).&lt;br /&gt;
    inputInvitation(playerType_S,StringParameter):-&lt;br /&gt;
        console::writef(playerType_C,StringParameter).&lt;br /&gt;
    inputInvitation(startingPlayer_S,StringParameter):-&lt;br /&gt;
        console::write(StringParameter,startingPlayer_C).&lt;br /&gt;
    inputInvitation(searchDepth_S,StringParameter):-&lt;br /&gt;
        console::writef(searchDepth_C,StringParameter).&lt;br /&gt;
    inputInvitation(fieldSize_S,StringParameter):-&lt;br /&gt;
        console::writef(fieldSize_C,StringParameter).&lt;br /&gt;
    inputInvitation(noOfRounds_S,StringParameter):-&lt;br /&gt;
        console::writef(noOfRounds_C,StringParameter).&lt;br /&gt;
    inputInvitation(singleOrMulti_S,_StringParameter):-&lt;br /&gt;
        console::write(gameOrCompetition_C).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    showStage():-&lt;br /&gt;
        game::multiMode_V=true,&lt;br /&gt;
        !.&lt;br /&gt;
    showStage():-&lt;br /&gt;
        console::clearOutput(),&lt;br /&gt;
        foreach I = std::fromTo(1, juniourJudge::maxColumn_P) do&lt;br /&gt;
            console::setLocation(console_native::coord(horizontalSpace_C*I, 0)), &lt;br /&gt;
            console::write(I)&lt;br /&gt;
        end foreach,&lt;br /&gt;
        foreach J = std::fromTo(1, juniourJudge::maxRow_P) do    &lt;br /&gt;
            console::setLocation(console_native::coord(0, verticalSpace_C*J)), &lt;br /&gt;
            console::write(J)&lt;br /&gt;
        end foreach.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    showStep(_Point,_Type):-&lt;br /&gt;
        game::multiMode_V=true,&lt;br /&gt;
        !.&lt;br /&gt;
    showStep(juniourJudge::c(X,Y),_Type):-&lt;br /&gt;
        console::setLocation(console_native::coord(horizontalSpace_C*X, verticalSpace_C*Y)),&lt;br /&gt;
        fail.&lt;br /&gt;
    showStep(_Cell,juniourJudge::ordinary_S):-&lt;br /&gt;
        console::write(cellMarkedOrdinary_C).&lt;br /&gt;
    showStep(_Cell,juniourJudge::winner_S):-&lt;br /&gt;
        console::write(cellMarkedWinner_C).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceStartUp():-&lt;br /&gt;
        reset().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceStarter(_Name):-&lt;br /&gt;
        game::multiMode_V=true,&lt;br /&gt;
        !.&lt;br /&gt;
    announceStarter(Name):-&lt;br /&gt;
        clearMessageArea(starterLine_C),&lt;br /&gt;
        writeMessage(starterLine_C,beginner_C,Name).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceSettingsError(errorPlayerType_S):-&lt;br /&gt;
        console::write(errorPlayerType_C),&lt;br /&gt;
        _=console::readLine().&lt;br /&gt;
    announceSettingsError(errorMustBeNumber_S):-&lt;br /&gt;
        console::write(errorMustBeNumber_C).&lt;br /&gt;
    announceSettingsError(errorStartingPlayer_S):-&lt;br /&gt;
        console::write(errorStartingPlayer_C).&lt;br /&gt;
    announceSettingsError(errorFieldSize_S):-&lt;br /&gt;
        console::write(errorFieldSize_C).&lt;br /&gt;
    announceSettingsError(errorNoOfRounds_S):-&lt;br /&gt;
        console::write(errorNoOfRounds_C).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announce(report_S,Report):-&lt;br /&gt;
        !,&lt;br /&gt;
        console::write(Report).&lt;br /&gt;
    announce(_AnnounceID,_AnnounceText).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    waitOK():-&lt;br /&gt;
        _=console::readLine().&lt;br /&gt;
clauses&lt;br /&gt;
    announceError():-&lt;br /&gt;
        announceError(&amp;quot;&amp;quot;).&lt;br /&gt;
 &lt;br /&gt;
    announceError(ErrorText):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,error_C,ErrorText).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin(Name):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,congratulation_C,Name),&lt;br /&gt;
        _ = console::readLine().&lt;br /&gt;
 &lt;br /&gt;
    announceLoss(Name):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,sorryLoss_C,Name),&lt;br /&gt;
        _ = console::readLine().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceThinker(_Name):-&lt;br /&gt;
        game::multiMode_V=true,&lt;br /&gt;
        !.&lt;br /&gt;
    announceThinker(Name):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(actionLine_C,thinker_C,Name).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    reset():-&lt;br /&gt;
        console::setLocation(console_native::coord(0,0)),&lt;br /&gt;
        console::write(string::create(1600,&amp;quot; &amp;quot;)),&lt;br /&gt;
        console::clearOutput().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    clearMessageArea:(positive AreaID).&lt;br /&gt;
clauses&lt;br /&gt;
    clearMessageArea(AreaID):-&lt;br /&gt;
        console::setLocation(console_native::coord(0,juniourJudge::maxRow_P*verticalSpace_C+AreaID)),&lt;br /&gt;
        console::write(string::create(emptyLineLenght_C,&amp;quot; &amp;quot;)).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    writeMessage:(positive AreaID,string FormatString,string ParameterString).&lt;br /&gt;
clauses&lt;br /&gt;
    writeMessage(AreaID,FormatString,ParameterString):-&lt;br /&gt;
        console::setLocation(console_native::coord(0, juniourJudge::maxRow_P*verticalSpace_C+AreaID)),&lt;br /&gt;
        console::writef(FormatString,ParameterString).&lt;br /&gt;
 &lt;br /&gt;
end implement humanInterface&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class human&lt;br /&gt;
******************************************/&lt;br /&gt;
class human:player&lt;br /&gt;
open core&lt;br /&gt;
constants&lt;br /&gt;
    playerDescriptor_C=&amp;quot;Human: Your strategy&amp;quot;.&lt;br /&gt;
end class human&lt;br /&gt;
 &lt;br /&gt;
implement human&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    name:string:=&amp;quot;Hum_&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setName(ProposedId):-&lt;br /&gt;
        name:=string::format(&amp;quot;%s%s&amp;quot;,name,ProposedId),&lt;br /&gt;
        Name=humanInterface::getInput(humanInterface::playerName_S,name),&lt;br /&gt;
        if not(Name=&amp;quot;&amp;quot;) then&lt;br /&gt;
            name:=Name&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    move():-&lt;br /&gt;
        InputString=humanInterface::getInput(humanInterface::playerStep_S),&lt;br /&gt;
        try&lt;br /&gt;
            juniourJudge::set(InputString)&lt;br /&gt;
        catch TraceID do&lt;br /&gt;
            handleException(TraceID),&lt;br /&gt;
            fail&lt;br /&gt;
        end try,&lt;br /&gt;
        !.&lt;br /&gt;
    move():-&lt;br /&gt;
        move().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin():-&lt;br /&gt;
        humanInterface::announceWin(name).&lt;br /&gt;
 &lt;br /&gt;
    announceLoss():-&lt;br /&gt;
        humanInterface::announceLoss(name).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    handleException:(exception::traceId TraceID).&lt;br /&gt;
clauses&lt;br /&gt;
    handleException(TraceID):-&lt;br /&gt;
        foreach Descriptor=exception::getDescriptor_nd(TraceID) do&lt;br /&gt;
            Descriptor = exception::descriptor(&lt;br /&gt;
                _ClassInfo1,&lt;br /&gt;
                exception::exceptionDescriptor(_ClassInfo2,_PredicateName,Description),&lt;br /&gt;
                _Kind,&lt;br /&gt;
                ExtraInfo,&lt;br /&gt;
                _GMTTime,&lt;br /&gt;
                _ExceptionDescription,&lt;br /&gt;
                _ThreadId),&lt;br /&gt;
            if&lt;br /&gt;
                ExtraInfo=[namedValue(&amp;quot;data&amp;quot;,string(CellPointer))]&lt;br /&gt;
            then&lt;br /&gt;
                ErrorMsg=string::format(Description,CellPointer),&lt;br /&gt;
                humanInterface::announceError(ErrorMsg)&lt;br /&gt;
            else&lt;br /&gt;
                humanInterface::announceError(&amp;quot;&amp;quot;)&lt;br /&gt;
            end if&lt;br /&gt;
        end foreach.&lt;br /&gt;
 &lt;br /&gt;
end implement human&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Class GenericComputer&lt;br /&gt;
************************/&lt;br /&gt;
interface genericComputer&lt;br /&gt;
    supports player&lt;br /&gt;
    supports polyLineBrain&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    setPolyLineBrain:(polyLineBrain).&lt;br /&gt;
    stepCandidate: (juniourJudge::cell*,juniourJudge::cell* [out],juniourJudge::cell [out]) nondeterm.&lt;br /&gt;
 &lt;br /&gt;
end interface genericComputer&lt;br /&gt;
 &lt;br /&gt;
class genericComputer:genericComputer&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
end class genericComputer&lt;br /&gt;
 &lt;br /&gt;
implement genericComputer&lt;br /&gt;
    delegate interface polyLineBrain to polyLineBrain_V&lt;br /&gt;
 &lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    name:string:=&amp;quot;Cmp_&amp;quot;.&lt;br /&gt;
    polyLineBrain_V:polyLineBrain:=erroneous.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setName(ProposedId):-&lt;br /&gt;
        name:=string::format(&amp;quot;%s%s&amp;quot;,name,ProposedId),&lt;br /&gt;
        Name=humanInterface::getInput(humanInterface::playerName_S,name),&lt;br /&gt;
        if not(Name=&amp;quot;&amp;quot;) then&lt;br /&gt;
            name:=Name&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setPolyLineBrain(PolyLineBrainObject):-&lt;br /&gt;
        polyLineBrain_V:=PolyLineBrainObject,&lt;br /&gt;
        polyLineBrain_V:setGenericComputer(This).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    move():-&lt;br /&gt;
        humanInterface::announceThinker(name),&lt;br /&gt;
        Cell=resolveStep(),&lt;br /&gt;
        juniourJudge::set(toString(Cell)).&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    resolveStep:()-&amp;gt;juniourJudge::cell.&lt;br /&gt;
clauses&lt;br /&gt;
    resolveStep()=Cell:-&lt;br /&gt;
        Cell=successfulStep(juniourJudge::polyline_P),&lt;br /&gt;
        !.&lt;br /&gt;
    resolveStep()=Cell:-&lt;br /&gt;
        Cell=randomStep(),&lt;br /&gt;
        !.&lt;br /&gt;
    resolveStep()=juniourJudge::c(X+1,Y+1):-&lt;br /&gt;
        X=math::random(juniourJudge::maxColumn_P-1),&lt;br /&gt;
        Y=math::random(juniourJudge::maxRow_P-1).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    stepCandidate([Cell],[Cell,NewCell], NewCell):-&lt;br /&gt;
        juniourJudge::neighbour_nd(Cell, NewCell).&lt;br /&gt;
    stepCandidate([Left, RestrictingCell | PolyLine],[NewCell,Left, RestrictingCell| PolyLine], NewCell):-&lt;br /&gt;
        NewCell=juniourJudge::neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    stepCandidate(PolyLine,list::reverse([NewCell,Left, RestrictingCell |PolyLineTail]),NewCell):-&lt;br /&gt;
        [Left, RestrictingCell |PolyLineTail] = list::reverse(PolyLine),&lt;br /&gt;
        NewCell=juniourJudge::neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin():-&lt;br /&gt;
        humanInterface::announceWin(name).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceLoss():-&lt;br /&gt;
        humanInterface::announceLoss(name).&lt;br /&gt;
 &lt;br /&gt;
end implement genericComputer&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Interface PolylineBrain&lt;br /&gt;
******************************************/&lt;br /&gt;
interface polylineBrain&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    setGenericComputer:(genericComputer).&lt;br /&gt;
    successfulStep: (juniourJudge::cell*)-&amp;gt;juniourJudge::cell nondeterm.&lt;br /&gt;
    randomStep:()-&amp;gt;juniourJudge::cell determ.&lt;br /&gt;
 &lt;br /&gt;
end interface polyLineBrain&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class computer1&lt;br /&gt;
******************************************/&lt;br /&gt;
class computer1:player&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    playerDescriptor_C=polyLineBrain1::playerDescriptor_C.&lt;br /&gt;
 &lt;br /&gt;
end class computer1&lt;br /&gt;
 &lt;br /&gt;
implement computer1&lt;br /&gt;
    inherits genericComputer&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        PolyLineBraneObj=polyLineBrain1::new(),&lt;br /&gt;
        setPolyLineBrain(PolyLineBraneObj).&lt;br /&gt;
 &lt;br /&gt;
end implement computer1&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class PolylineBrain1&lt;br /&gt;
******************************************/&lt;br /&gt;
class polyLineBrain1:polyLineBrain&lt;br /&gt;
open core&lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    playerDescriptor_C=&amp;quot;Computer1: The full depth search strategy&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
end class polyLineBrain1&lt;br /&gt;
 &lt;br /&gt;
implement polyLineBrain1&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;polyLineBrain1&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    genericComputer_V:genericComputer:=erroneous.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setGenericComputer(GenericComputerObj):-&lt;br /&gt;
        genericComputer_V:=GenericComputerObj.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    successfulStep(PolyLine)=BestMove:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine, _PolyLine1,BestMove),&lt;br /&gt;
        list::isMember(BestMove, PolyLine),&lt;br /&gt;
        !.&lt;br /&gt;
    successfulStep(PolyLine)=Cell:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine, PolyLine1,Cell),&lt;br /&gt;
            not(_=successfulStep(PolyLine1)).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    randomStep()=Cell:-&lt;br /&gt;
        findAll(NewCell,genericComputer_V:stepCandidate(juniourJudge::polyline_P,_Polyline1, NewCell),CellCandidateListWithDuplicates),&lt;br /&gt;
        CellCandidateList=list::removeDuplicates(CellCandidateListWithDuplicates),&lt;br /&gt;
        not(CellCandidateList=[]),&lt;br /&gt;
        NoOfVariants=list::length(CellCandidateList),&lt;br /&gt;
        ChoiceNo=math::random(NoOfVariants-1),&lt;br /&gt;
        Cell=list::nth(ChoiceNo+1,CellCandidateList).&lt;br /&gt;
 &lt;br /&gt;
end implement polylineBrain1&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class computer2&lt;br /&gt;
******************************************/&lt;br /&gt;
class computer2:player&lt;br /&gt;
open core&lt;br /&gt;
constants&lt;br /&gt;
    playerDescriptor_C=polyLineBrain2::playerDescriptor_C.&lt;br /&gt;
 &lt;br /&gt;
end class computer2&lt;br /&gt;
 &lt;br /&gt;
implement computer2&lt;br /&gt;
    inherits genericComputer&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        PolyLineBraneObj=polyLineBrain2::new(),&lt;br /&gt;
        setPolyLineBrain(PolyLineBraneObj).&lt;br /&gt;
 &lt;br /&gt;
end implement computer2&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class PolylineBrain2&lt;br /&gt;
******************************************/&lt;br /&gt;
class polyLineBrain2:polyLineBrain&lt;br /&gt;
open core&lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    playerDescriptor_C=&amp;quot;Computer2: Easy strategy. The prognosis depth is limited&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
end class polyLineBrain2&lt;br /&gt;
 &lt;br /&gt;
implement polyLineBrain2&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;polyLineBrain2&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    depth_V:positive:=5.&lt;br /&gt;
    genericComputer_V:genericComputer:=erroneous.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        defineSearchDepth().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    setGenericComputer(GenericComputerObj):-&lt;br /&gt;
        genericComputer_V:=GenericComputerObj.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    defineSearchDepth:().&lt;br /&gt;
clauses&lt;br /&gt;
    defineSearchDepth():-&lt;br /&gt;
        DepthStr=humanInterface::getInput(humanInterface::searchDepth_S,toString(depth_V)),&lt;br /&gt;
        not(DepthStr=&amp;quot;&amp;quot;),&lt;br /&gt;
        !,&lt;br /&gt;
        try&lt;br /&gt;
            depth_V:=toTerm(DepthStr),&lt;br /&gt;
            if depth_V mod 2 = 0 then&lt;br /&gt;
                depth_V:=depth_V+1&lt;br /&gt;
            end if    &lt;br /&gt;
        catch _TraceID1 do&lt;br /&gt;
            humanInterface::announceSettingsError(humanInterface::errorMustBeNumber_S),&lt;br /&gt;
            defineSearchDepth()&lt;br /&gt;
        end try.&lt;br /&gt;
    defineSearchDepth().&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    successfulStep: (integer Counter, juniourJudge::cell*)-&amp;gt;juniourJudge::cell nondeterm.&lt;br /&gt;
clauses&lt;br /&gt;
    successfulStep(PolyLine)=BestMove:-&lt;br /&gt;
        BestMove=successfulStep(depth_V,PolyLine).&lt;br /&gt;
 &lt;br /&gt;
    successfulStep(Counter,PolyLine)=BestMove:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine,_PolyLine1,BestMove),&lt;br /&gt;
        isStepSuccessful(Counter,PolyLine,BestMove),&lt;br /&gt;
        !.&lt;br /&gt;
    successfulStep(Counter,PolyLine)=Cell:-&lt;br /&gt;
        genericComputer_V:stepCandidate(PolyLine, PolyLine1,Cell),&lt;br /&gt;
            not(_=successfulStep(Counter-1,PolyLine1)).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    randomStep()=Cell:-&lt;br /&gt;
        findAll(NewCell,genericComputer_V:stepCandidate(juniourJudge::polyline_P,_Polyline1, NewCell),CellCandidateListWithDuplicates),&lt;br /&gt;
        CellCandidateList=list::removeDuplicates(CellCandidateListWithDuplicates),&lt;br /&gt;
        not(CellCandidateList=[]),&lt;br /&gt;
        NoOfVariants=list::length(CellCandidateList),&lt;br /&gt;
        ChoiceNo=math::random(NoOfVariants-1),&lt;br /&gt;
        Cell=list::nth(ChoiceNo+1,CellCandidateList).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    isStepSuccessful:(integer Counter,juniourJudge::cell* PolyLine,juniourJudge::cell BestMove) determ.&lt;br /&gt;
clauses&lt;br /&gt;
    isStepSuccessful(_Counter,PolyLine,BestMove):-&lt;br /&gt;
        list::isMember(BestMove, PolyLine),&lt;br /&gt;
        !.&lt;br /&gt;
    isStepSuccessful(Counter,_PolyLine,_BestMove):-&lt;br /&gt;
        Counter&amp;lt;=1.&lt;br /&gt;
 &lt;br /&gt;
end implement polylineBrain2&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 6]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_5&amp;diff=2567</id>
		<title>Tutorial Project. Release 5</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_5&amp;diff=2567"/>
		<updated>2011-04-01T13:37:54Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal= Demonstrating the properties of Visual Prolog language and simple programming techniques.&lt;br /&gt;
|goalContent=&lt;br /&gt;
|code=&lt;br /&gt;
* The size of the board is set 10х10 in the code;&lt;br /&gt;
* The computer makes the prognosis on K steps forward;&lt;br /&gt;
* If no safe move found, then the next move is random (maybe extremely unsuccessful);&lt;br /&gt;
* The parameter of the depth of the prognosis is by choice &lt;br /&gt;
|functionality=No changes.&lt;br /&gt;
|install={{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
{{Polyline1_10Open|project=&amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline5\Polyline5.prj&amp;#039;&amp;#039;&amp;#039;}}&lt;br /&gt;
&lt;br /&gt;
{{Polyline1-06Copy_Paste}}&lt;br /&gt;
|run=Run the application using the “E” of the IDE or run the executable at the directory EXE.&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
/****************************************************&lt;br /&gt;
Written by Victor Yukhtenko&lt;br /&gt;
&lt;br /&gt;
SpbSolutions/Examples/Polyline&lt;br /&gt;
&lt;br /&gt;
Predicates, which represent the strategy&lt;br /&gt;
    neighbour_nd,&lt;br /&gt;
    neighbourOutOfPolyLine_nd,&lt;br /&gt;
    stepCandidate&lt;br /&gt;
based on solutions proposed by Elena Efimova&lt;br /&gt;
Predidcates&lt;br /&gt;
    resolveStep &lt;br /&gt;
    successfulStep&lt;br /&gt;
modified&lt;br /&gt;
*****************************************************/&lt;br /&gt;
goal&lt;br /&gt;
    mainExe::run(main::run).&lt;br /&gt;
&lt;br /&gt;
/**************&lt;br /&gt;
Class Main&lt;br /&gt;
**************/    &lt;br /&gt;
implement main&lt;br /&gt;
    open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;main&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    run():-&lt;br /&gt;
        console::init(),   &lt;br /&gt;
        game::run().&lt;br /&gt;
 &lt;br /&gt;
end implement main&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class Game&lt;br /&gt;
******************************************/&lt;br /&gt;
class game&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    run:().&lt;br /&gt;
end class game&lt;br /&gt;
 &lt;br /&gt;
implement game&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;game&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    playerNo_V:positive:=1.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    run():-&lt;br /&gt;
        humanInterface::announceStartUp(),&lt;br /&gt;
        PlayerType=humanInterface::getInput(humanInterface::playerType_S,toString(playerNo_V)),&lt;br /&gt;
        not(PlayerType=&amp;quot;&amp;quot;),&lt;br /&gt;
        try&lt;br /&gt;
            Player=createPlayerObject(toTerm(PlayerType)),&lt;br /&gt;
            seniourJudge::addPlayer(Player),&lt;br /&gt;
            playerNo_V:=playerNo_V+1&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            humanInterface::announceManagerError(humanInterface::errorPlayerType_S)&lt;br /&gt;
        end try,&lt;br /&gt;
        !,&lt;br /&gt;
        run().&lt;br /&gt;
    run():-&lt;br /&gt;
        startingPlayer().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    playListMember:()-&amp;gt;string nondeterm.&lt;br /&gt;
clauses&lt;br /&gt;
    playListMember()=PlayersListMember:-&lt;br /&gt;
        I = std::fromTo(1, list::length(seniourJudge::players_V)),&lt;br /&gt;
            Player=list::nth(I-1,seniourJudge::players_V),&lt;br /&gt;
            PlayersListMember=string::format(&amp;quot;\n% - %&amp;quot;,I,Player:name).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    startingPlayer:().&lt;br /&gt;
clauses&lt;br /&gt;
    startingPlayer():-&lt;br /&gt;
        not(seniourJudge::players_V=[]) and not(seniourJudge::players_V=[_SiglePlayer]),&lt;br /&gt;
        findAll(PlayListMember,PlayListMember=playListMember(),PlayList),&lt;br /&gt;
        PlayListStr=string::concatList(PlayList),&lt;br /&gt;
        StartingPlayerStr=humanInterface::getInput(humanInterface::startingPlayer_S,PlayListStr),&lt;br /&gt;
        not(StartingPlayerStr=&amp;quot;&amp;quot;), &lt;br /&gt;
        try&lt;br /&gt;
            StartingPlayer=toTerm(StartingPlayerStr),&lt;br /&gt;
            !,&lt;br /&gt;
            startGame(StartingPlayer)&lt;br /&gt;
        catch _TraceID1 do&lt;br /&gt;
            humanInterface::announceManagerError(humanInterface::errorMustBeNumber_S),&lt;br /&gt;
            !,&lt;br /&gt;
            startingPlayer()&lt;br /&gt;
        end try.&lt;br /&gt;
    startingPlayer().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    startGame:(positive).&lt;br /&gt;
clauses&lt;br /&gt;
    startGame(StartingPlayer):-&lt;br /&gt;
        try&lt;br /&gt;
            Player=list::nth(StartingPlayer-1,seniourJudge::players_V), % list::nth(...) needs unsigned&lt;br /&gt;
            !,&lt;br /&gt;
            seniourJudge::play(Player)&lt;br /&gt;
        catch _Trace_D do    &lt;br /&gt;
            humanInterface::announceManagerError(humanInterface::errorStartingPlayer_S),&lt;br /&gt;
            !&lt;br /&gt;
        end try,&lt;br /&gt;
        !,&lt;br /&gt;
        startingPlayer().&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    createPlayerObject:(positive)-&amp;gt;player.&lt;br /&gt;
clauses&lt;br /&gt;
    createPlayerObject(1)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=human::new().&lt;br /&gt;
    createPlayerObject(2)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=computer::new().&lt;br /&gt;
    createPlayerObject(_)=_Player:-&lt;br /&gt;
        exception::raise(classInfo,wrongInputException,[]).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    wrongInputException:exception.&lt;br /&gt;
clauses&lt;br /&gt;
    wrongInputException&lt;br /&gt;
        (&lt;br /&gt;
        classInfo,&lt;br /&gt;
        predicate_Name(),&lt;br /&gt;
        &amp;quot;&amp;quot;&lt;br /&gt;
        ).&lt;br /&gt;
 &lt;br /&gt;
end implement game&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Class SeniorJudge&lt;br /&gt;
************************/&lt;br /&gt;
class seniourJudge&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    players_V:player*.&lt;br /&gt;
    inProgress_V:boolean.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    play:(player CurrentPlayer).&lt;br /&gt;
    addPlayer:(player NextPlayer).&lt;br /&gt;
end class seniourJudge&lt;br /&gt;
 &lt;br /&gt;
implement seniourJudge&lt;br /&gt;
open core, humanInterface&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    players_V:player*:=[].&lt;br /&gt;
    inProgress_V:boolean:=false.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    play(Player):-&lt;br /&gt;
        inProgress_V=false,&lt;br /&gt;
        humanInterface::showStage(),&lt;br /&gt;
        inProgress_V:=true,&lt;br /&gt;
        Player:move(),&lt;br /&gt;
        humanInterface::announceStarter(Player:name),&lt;br /&gt;
        play(Player),&lt;br /&gt;
        !.&lt;br /&gt;
    play(Player):-&lt;br /&gt;
        juniourJudge::isGameOver(),&lt;br /&gt;
        !,&lt;br /&gt;
        Player:announceWin(),&lt;br /&gt;
        foreach (Participant=list::getMember_nd(players_V) and not(Participant=Player)) do&lt;br /&gt;
            Participant:announceLoss()&lt;br /&gt;
        end foreach,&lt;br /&gt;
        inProgress_V:=false,&lt;br /&gt;
        juniourJudge::reset().&lt;br /&gt;
    play(Player):-&lt;br /&gt;
        NextPlayer=nextPlayer(Player),&lt;br /&gt;
        NextPlayer:move(),&lt;br /&gt;
        !,&lt;br /&gt;
        play(NextPlayer).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    addPlayer(NextPlayer):-&lt;br /&gt;
        players_V:=list::append(players_V,[NextPlayer]).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    nextPlayer:(player CurrentPlayer)-&amp;gt;player NextPlayer.&lt;br /&gt;
clauses&lt;br /&gt;
    nextPlayer(Player)=NextPlayer:-&lt;br /&gt;
        Index=list::tryGetIndex(Player,players_V),&lt;br /&gt;
        NextPlayer=list::tryGetNth(Index+1,players_V),&lt;br /&gt;
        !.&lt;br /&gt;
    nextPlayer(_Player)=list::nth(0,players_V).&lt;br /&gt;
 &lt;br /&gt;
end implement seniourJudge&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Class JuniourJudge&lt;br /&gt;
************************/&lt;br /&gt;
class juniourJudge&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    cell = c(positive,positive).&lt;br /&gt;
    stepType_D=&lt;br /&gt;
        ordinary_S;&lt;br /&gt;
        winner_S.&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    maxRow_P:positive.&lt;br /&gt;
    maxColumn_P:positive.&lt;br /&gt;
    polyline_P:cell*.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    neighbour_nd: (cell,cell) nondeterm (i,o) (i,i).&lt;br /&gt;
    neighbourOutOfPolyLine_nd:(cell,cell)-&amp;gt;cell nondeterm.&lt;br /&gt;
    set: (string ).&lt;br /&gt;
    isGameOver:() determ.&lt;br /&gt;
    reset:().&lt;br /&gt;
 &lt;br /&gt;
end class juniourJudge&lt;br /&gt;
 &lt;br /&gt;
implement juniourJudge&lt;br /&gt;
open core, humanInterface&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;JuniourJudge&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    maxRow_P:positive:=10.&lt;br /&gt;
    maxColumn_P:positive:=10.&lt;br /&gt;
    polyline_P:cell*:=[].&lt;br /&gt;
    endOfGame_V:boolean:=false.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    isGameOver():-&lt;br /&gt;
        endOfGame_V=true.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    set(InputString):-&lt;br /&gt;
        Cell=toTerm(InputString),&lt;br /&gt;
        handleInput (Cell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    reset():-&lt;br /&gt;
        juniourJudge:: polyline_P:=[],&lt;br /&gt;
        juniourJudge::endOfGame_V:=false.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    handleInput:(juniourJudge::cell).&lt;br /&gt;
clauses&lt;br /&gt;
    handleInput(Cell):-&lt;br /&gt;
        list::isMember(Cell,polyline_P),&lt;br /&gt;
        try &lt;br /&gt;
            _=makePolyLine(Cell,polyline_P) % it will be an exception if wrong Cell, but we ignore it by failing&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            fail&lt;br /&gt;
        end try,&lt;br /&gt;
        !,&lt;br /&gt;
        endOfGame_V:=true,&lt;br /&gt;
        humanInterface::showStep(Cell,winner_S).&lt;br /&gt;
    handleInput (Cell):-&lt;br /&gt;
        polyline_P:=makePolyLine(Cell,polyline_P),&lt;br /&gt;
        !,&lt;br /&gt;
        humanInterface::showStep(Cell,ordinary_S).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    makePolyLine: (cell,cell*)-&amp;gt; cell* multi.&lt;br /&gt;
clauses&lt;br /&gt;
    makePolyLine(c(X,Y),[])=[c(X,Y)]:-&lt;br /&gt;
        X&amp;gt;0,X&amp;lt;=maxColumn_P,&lt;br /&gt;
        Y&amp;gt;0,Y&amp;lt;=maxRow_P,&lt;br /&gt;
        !.&lt;br /&gt;
    makePolyLine(NewCell,[SingleCell])=[NewCell,SingleCell]:-&lt;br /&gt;
        neighbour_nd(SingleCell, NewCell),&lt;br /&gt;
        !.&lt;br /&gt;
    makePolyLine(NewCell,[Left, RestrictingCell | PolyLineTail])=[NewCell, Left, RestrictingCell | PolyLineTail]:-&lt;br /&gt;
        NewCell=neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    makePolyLine(NewCell,PolyLine)=list::reverse([NewCell,Left, RestrictingCell | PolyLineTail]):-&lt;br /&gt;
        [Left, RestrictingCell | PolyLineTail]= list::reverse(PolyLine),&lt;br /&gt;
        NewCell=neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    makePolyLine(NewCell,_PolyLine)= _PolyLine1:-&lt;br /&gt;
        exception::raise(classInfo,wrongStepException,[namedValue(&amp;quot;data&amp;quot;,string(toString(NewCell)))]).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    wrongStepException:exception.&lt;br /&gt;
clauses&lt;br /&gt;
    wrongStepException&lt;br /&gt;
        (&lt;br /&gt;
        classInfo,&lt;br /&gt;
        predicate_Name(),&lt;br /&gt;
        &amp;quot;the point % can not prolong the polyline!&amp;quot;&lt;br /&gt;
        ).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    neighbourOutOfPolyLine_nd(Cell,RestrictingCell)=NewCell:-&lt;br /&gt;
        neighbour_nd(Cell,NewCell),&lt;br /&gt;
            not(NewCell = RestrictingCell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    neighbour_nd(c(X, Y), c(X + 1, Y)):- X &amp;lt; maxColumn_P.        &lt;br /&gt;
    neighbour_nd(c(X, Y), c(X, Y + 1)):- Y &amp;lt; maxrow_P.            &lt;br /&gt;
    neighbour_nd(c(X, Y), c(X - 1, Y)):- X &amp;gt; 1.&lt;br /&gt;
    neighbour_nd(c(X, Y), c(X, Y - 1)):- Y &amp;gt; 1.    &lt;br /&gt;
 &lt;br /&gt;
end implement juniourJudge&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Interface Player&lt;br /&gt;
******************************************/&lt;br /&gt;
interface player&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    move:().&lt;br /&gt;
    announceWin:().&lt;br /&gt;
    announceLoss:().&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    name:string.&lt;br /&gt;
 &lt;br /&gt;
end interface player&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class Human&lt;br /&gt;
******************************************/&lt;br /&gt;
class human:player&lt;br /&gt;
open core&lt;br /&gt;
end class human&lt;br /&gt;
 &lt;br /&gt;
implement human&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    name:string:=string::format(&amp;quot;Hum_%&amp;quot;,toString(This)).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        Name=humanInterface::getInput(humanInterface::playerName_S,name),&lt;br /&gt;
        if not(Name=&amp;quot;&amp;quot;) then&lt;br /&gt;
            name:=Name&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    move():-&lt;br /&gt;
        InputString=humanInterface::getInput(humanInterface::playerStep_S),&lt;br /&gt;
        try&lt;br /&gt;
            juniourJudge::set(InputString)&lt;br /&gt;
        catch TraceID do&lt;br /&gt;
            handleException(TraceID),&lt;br /&gt;
            fail&lt;br /&gt;
        end try,&lt;br /&gt;
        !.&lt;br /&gt;
    move():-&lt;br /&gt;
        move().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin():-&lt;br /&gt;
        humanInterface::announceWin(name).&lt;br /&gt;
 &lt;br /&gt;
    announceLoss():-&lt;br /&gt;
        humanInterface::announceLoss(name).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    handleException:(exception::traceId TraceID).&lt;br /&gt;
clauses&lt;br /&gt;
    handleException(TraceID):-&lt;br /&gt;
        foreach Descriptor=exception::getDescriptor_nd(TraceID) do&lt;br /&gt;
            Descriptor = exception::descriptor(&lt;br /&gt;
                _ClassInfo1,&lt;br /&gt;
                exception::exceptionDescriptor(_ClassInfo2,_PredicateName,Description),&lt;br /&gt;
                _Kind,&lt;br /&gt;
                ExtraInfo,&lt;br /&gt;
                _GMTTime,&lt;br /&gt;
                _ExceptionDescription,&lt;br /&gt;
                _ThreadId),&lt;br /&gt;
            if&lt;br /&gt;
                ExtraInfo=[namedValue(&amp;quot;data&amp;quot;,string(CellPointer))]&lt;br /&gt;
            then&lt;br /&gt;
                ErrorMsg=string::format(Description,CellPointer),&lt;br /&gt;
                humanInterface::announceError(ErrorMsg)&lt;br /&gt;
            else&lt;br /&gt;
                humanInterface::announceError(&amp;quot;&amp;quot;)&lt;br /&gt;
            end if&lt;br /&gt;
        end foreach.&lt;br /&gt;
 &lt;br /&gt;
end implement human&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class Computer&lt;br /&gt;
******************************************/&lt;br /&gt;
class computer:player&lt;br /&gt;
end class computer&lt;br /&gt;
 &lt;br /&gt;
implement computer&lt;br /&gt;
    inherits genericComputer&lt;br /&gt;
end implement computer&lt;br /&gt;
/******************************************&lt;br /&gt;
  Class GenericComputer&lt;br /&gt;
******************************************/&lt;br /&gt;
interface genericComputer&lt;br /&gt;
    supports player&lt;br /&gt;
    supports polyLineBrain&lt;br /&gt;
 &lt;br /&gt;
end interface genericComputer&lt;br /&gt;
 &lt;br /&gt;
class genericComputer:genericComputer&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
end class genericComputer&lt;br /&gt;
 &lt;br /&gt;
implement genericComputer&lt;br /&gt;
    inherits polyLineBrain2&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    name:string:=string::format(&amp;quot;Cmp_%&amp;quot;,toString(This)).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        Name=humanInterface::getInput(humanInterface::playerName_S,name),&lt;br /&gt;
        if not(Name=&amp;quot;&amp;quot;) then&lt;br /&gt;
            name:=Name&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    move():-&lt;br /&gt;
        humanInterface::announceThinker(name),&lt;br /&gt;
        Cell=resolveStep(),&lt;br /&gt;
        juniourJudge::set(toString(Cell)).&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    resolveStep:()-&amp;gt;juniourJudge::cell.&lt;br /&gt;
clauses&lt;br /&gt;
    resolveStep()=Cell:-&lt;br /&gt;
        Cell=successfulStep(juniourJudge::polyline_P),&lt;br /&gt;
        !.&lt;br /&gt;
    resolveStep()=Cell:-&lt;br /&gt;
        Cell=randomStep(),&lt;br /&gt;
        !.&lt;br /&gt;
    resolveStep()=juniourJudge::c(X+1,Y+1):-&lt;br /&gt;
        X=math::random(juniourJudge::maxColumn_P-1),&lt;br /&gt;
        Y=math::random(juniourJudge::maxRow_P-1).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    stepCandidate([Cell],[Cell,NewCell], NewCell):-&lt;br /&gt;
        juniourJudge::neighbour_nd(Cell, NewCell).&lt;br /&gt;
    stepCandidate([Left, RestrictingCell | PolyLine],[NewCell,Left, RestrictingCell| PolyLine], NewCell):-&lt;br /&gt;
        NewCell=juniourJudge::neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    stepCandidate(PolyLine,list::reverse([NewCell,Left, RestrictingCell |PolyLineTail]),NewCell):-&lt;br /&gt;
        [Left, RestrictingCell |PolyLineTail] = list::reverse(PolyLine),&lt;br /&gt;
        NewCell=juniourJudge::neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin():-&lt;br /&gt;
        humanInterface::announceWin(name).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceLoss():-&lt;br /&gt;
        humanInterface::announceLoss(name).&lt;br /&gt;
 &lt;br /&gt;
end implement genericComputer&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Interface PolylineBrain&lt;br /&gt;
******************************************/&lt;br /&gt;
interface polylineBrain&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
   notDefinedPredicate_C=&amp;quot;The predicate is not defined. Must be defined in the daughter class. &amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    stepCandidate: (juniourJudge::cell*,juniourJudge::cell* [out],juniourJudge::cell [out]) nondeterm.&lt;br /&gt;
    successfulStep: (juniourJudge::cell*)-&amp;gt;juniourJudge::cell nondeterm.&lt;br /&gt;
    randomStep:()-&amp;gt;juniourJudge::cell determ.&lt;br /&gt;
 &lt;br /&gt;
end interface polyLineBrain&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class PolylineBrain2&lt;br /&gt;
******************************************/&lt;br /&gt;
class polyLineBrain2:polyLineBrain&lt;br /&gt;
open core&lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
end class polyLineBrain2&lt;br /&gt;
 &lt;br /&gt;
implement polyLineBrain2&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;polyLineBrain2&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    depth_V:positive:=20.&lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        defineSearchDepth().&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    defineSearchDepth:().&lt;br /&gt;
clauses&lt;br /&gt;
    defineSearchDepth():-&lt;br /&gt;
        DepthStr=humanInterface::getInput(humanInterface::searchDepth_S,toString(depth_V)),&lt;br /&gt;
        not(DepthStr=&amp;quot;&amp;quot;),&lt;br /&gt;
        !,&lt;br /&gt;
        try&lt;br /&gt;
            depth_V:=toTerm(DepthStr)&lt;br /&gt;
        catch _TraceID1 do&lt;br /&gt;
            humanInterface::announceManagerError(humanInterface::errorMustBeNumber_S),&lt;br /&gt;
            defineSearchDepth()&lt;br /&gt;
        end try.&lt;br /&gt;
    defineSearchDepth().&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    successfulStep: (integer Counter, juniourJudge::cell*)-&amp;gt;juniourJudge::cell nondeterm.&lt;br /&gt;
clauses&lt;br /&gt;
    successfulStep(PolyLine)=BestMove:-&lt;br /&gt;
        BestMove=successfulStep(depth_V,PolyLine).&lt;br /&gt;
 &lt;br /&gt;
    successfulStep(Counter,PolyLine)=BestMove:-&lt;br /&gt;
        This:stepCandidate(PolyLine,_PolyLine1,BestMove),&lt;br /&gt;
        isStepSuccessful(Counter,PolyLine,BestMove),&lt;br /&gt;
        !.&lt;br /&gt;
    successfulStep(Counter,PolyLine)=Cell:-&lt;br /&gt;
        This:stepCandidate(PolyLine, PolyLine1,Cell),&lt;br /&gt;
            not(_=successfulStep(Counter-1,PolyLine1)).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    randomStep()=Cell:-&lt;br /&gt;
        findAll(NewCell,This:stepCandidate(juniourJudge::polyline_P,_Polyline1, NewCell),CellCandidateListWithDuplicates),&lt;br /&gt;
        CellCandidateList=list::removeDuplicates(CellCandidateListWithDuplicates),&lt;br /&gt;
        not(CellCandidateList=[]),&lt;br /&gt;
        NoOfVariants=list::length(CellCandidateList),&lt;br /&gt;
        ChoiceNo=math::random(NoOfVariants-1),&lt;br /&gt;
        Cell=list::nth(ChoiceNo+1,CellCandidateList).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    isStepSuccessful:(integer Counter,juniourJudge::cell* PolyLine,juniourJudge::cell BestMove) determ.&lt;br /&gt;
clauses&lt;br /&gt;
    isStepSuccessful(_Counter,PolyLine,BestMove):-&lt;br /&gt;
        list::isMember(BestMove, PolyLine),&lt;br /&gt;
        !.&lt;br /&gt;
    isStepSuccessful(Counter,_PolyLine,_BestMove):-&lt;br /&gt;
        Counter&amp;lt;=1.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    stepCandidate(_Cell,_PolyLine,_Move):-&lt;br /&gt;
        common_exception::raise_error(classinfo,predicate_name(),notDefinedPredicate_C).&lt;br /&gt;
 &lt;br /&gt;
end implement polylineBrain2&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class HumanInterface&lt;br /&gt;
******************************************/&lt;br /&gt;
class humanInterface&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    announceStartUp:().&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    showStage:().&lt;br /&gt;
    showStep:(juniourJudge::cell,juniourJudge::stepType_D).&lt;br /&gt;
    getInput:(inputType_D,string StringParameter)-&amp;gt;string InputString.&lt;br /&gt;
    getInput:(inputType_D)-&amp;gt;string InputString.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    announceManagerError:(choiceError_D).&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    announceStarter:(string Name).&lt;br /&gt;
    announceThinker:(string Name).&lt;br /&gt;
    announceWin:(string Name).&lt;br /&gt;
    announceLoss:(string Name).&lt;br /&gt;
    announceError:(string Description).&lt;br /&gt;
    announceError:().&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    choiceError_D=&lt;br /&gt;
        errorPlayerType_S;&lt;br /&gt;
        errorMustBeNumber_S;&lt;br /&gt;
        errorstartingPlayer_S.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    inputType_D=&lt;br /&gt;
        playerStep_S;&lt;br /&gt;
        playerType_S;&lt;br /&gt;
        playerName_S;&lt;br /&gt;
        startingPlayer_S;&lt;br /&gt;
        searchDepth_S.&lt;br /&gt;
 &lt;br /&gt;
end class humanInterface&lt;br /&gt;
 &lt;br /&gt;
implement humanInterface&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    cellMarkedOrdinary_C=&amp;quot;*&amp;quot;.&lt;br /&gt;
    cellMarkedWinner_C=&amp;quot;O&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
constants % messages&lt;br /&gt;
    thinker_C=&amp;quot;% is thinking ...&amp;quot;.&lt;br /&gt;
    beginner_C=&amp;quot;First move done by: %&amp;quot;.&lt;br /&gt;
    error_C=&amp;quot;Error, % &amp;quot;.&lt;br /&gt;
    congratulation_C=&amp;quot;Player % won!&amp;quot;.&lt;br /&gt;
    sorryLoss_C=&amp;quot;%,  Sorry, you loss :-(&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
    playerStep_C=&amp;quot;Please enter your move as c(X,Y): &amp;quot;.&lt;br /&gt;
    playerType_C=&amp;quot;\nPlayer #%s. Please enter the player type (1-human, 2-computer, Enter - end of choice):&amp;quot;.&lt;br /&gt;
    playerName_C=&amp;quot;\nPlease assign the name to the player (% proposed):&amp;quot;.&lt;br /&gt;
    startingPlayer_C=&amp;quot;\nWho moves the first (PlayerNo or Enter - end of the game)?:&amp;quot;.&lt;br /&gt;
    searchDepth_C=&amp;quot;\nDefine the depth of the search (% - by default)?? &amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
    errorPlayerType_C=&amp;quot;\nNo such player type exists! Enter - repeat input:&amp;quot;.&lt;br /&gt;
    errorMustBeNumber_C=&amp;quot;\nMust be number! Please repeat input:&amp;quot;.&lt;br /&gt;
    errorstartingPlayer_C=&amp;quot;\nNo such Player exiasts! Please repeat input:&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    verticalSpace_C=2.&lt;br /&gt;
    horizontalSpace_C=3.&lt;br /&gt;
    emptyLineLenght_C=80.&lt;br /&gt;
 &lt;br /&gt;
constants % Position of Line&lt;br /&gt;
    starterLine_C=1.&lt;br /&gt;
    announceLine_C=starterLine_C+1.&lt;br /&gt;
    actionLine_C=announceLine_C+1.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    getInput(InputType)=Input:-&lt;br /&gt;
        Input=getInput(InputType,&amp;quot;&amp;quot;).&lt;br /&gt;
 &lt;br /&gt;
    getInput(InputType,StringParameter)=Input:-&lt;br /&gt;
        inputInvitation(InputType,StringParameter),&lt;br /&gt;
        Input = console::readLine(),&lt;br /&gt;
        console::clearInput().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    inputInvitation:(inputType_D,string StringParameter).&lt;br /&gt;
clauses&lt;br /&gt;
    inputInvitation(playerStep_S,_StringParameter):-&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(actionLine_C,&amp;quot;%&amp;quot;,playerStep_C).&lt;br /&gt;
    inputInvitation(playerName_S,StringParameter):-&lt;br /&gt;
        console::writef(playerName_C,StringParameter).&lt;br /&gt;
    inputInvitation(playerType_S,StringParameter):-&lt;br /&gt;
        console::writef(playerType_C,StringParameter).&lt;br /&gt;
    inputInvitation(startingPlayer_S,StringParameter):-&lt;br /&gt;
        console::write(StringParameter,startingPlayer_C).&lt;br /&gt;
    inputInvitation(searchDepth_S,StringParameter):-&lt;br /&gt;
        console::writef(searchDepth_C,StringParameter).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    showStage():-&lt;br /&gt;
        console::clearOutput(),&lt;br /&gt;
        foreach I = std::fromTo(1, juniourJudge::maxColumn_P) do&lt;br /&gt;
            console::setLocation(console_native::coord(horizontalSpace_C*I, 0)), &lt;br /&gt;
            console::write(I)&lt;br /&gt;
        end foreach,&lt;br /&gt;
        foreach J = std::fromTo(1, juniourJudge::maxRow_P) do    &lt;br /&gt;
            console::setLocation(console_native::coord(0, verticalSpace_C*J)), &lt;br /&gt;
            console::write(J)&lt;br /&gt;
        end foreach.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    showStep(juniourJudge::c(X,Y),_Type):-&lt;br /&gt;
        console::setLocation(console_native::coord(horizontalSpace_C*X, verticalSpace_C*Y)),&lt;br /&gt;
        fail.&lt;br /&gt;
    showStep(_Cell,juniourJudge::ordinary_S):-&lt;br /&gt;
        console::write(cellMarkedOrdinary_C).&lt;br /&gt;
    showStep(_Cell,juniourJudge::winner_S):-&lt;br /&gt;
        console::write(cellMarkedWinner_C).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceStartUp():-&lt;br /&gt;
        console::clearOutput().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceStarter(Name):-&lt;br /&gt;
        clearMessageArea(starterLine_C),&lt;br /&gt;
        writeMessage(starterLine_C,beginner_C,Name).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceManagerError(errorPlayerType_S):-&lt;br /&gt;
        console::write(errorPlayerType_C),&lt;br /&gt;
        _=console::readLine().&lt;br /&gt;
    announceManagerError(errorMustBeNumber_S):-&lt;br /&gt;
        console::write(errorMustBeNumber_C).&lt;br /&gt;
    announceManagerError(errorstartingPlayer_S):-&lt;br /&gt;
        console::write(errorstartingPlayer_C).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceError():-&lt;br /&gt;
        announceError(&amp;quot;&amp;quot;).&lt;br /&gt;
 &lt;br /&gt;
    announceError(ErrorText):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,error_C,ErrorText).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin(Name):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,congratulation_C,Name),&lt;br /&gt;
        _ = console::readLine().&lt;br /&gt;
 &lt;br /&gt;
    announceLoss(Name):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,sorryLoss_C,Name),&lt;br /&gt;
        _ = console::readLine().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceThinker(Name):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(actionLine_C,thinker_C,Name).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    clearMessageArea:(positive AreaID).&lt;br /&gt;
clauses&lt;br /&gt;
    clearMessageArea(AreaID):-&lt;br /&gt;
        console::setLocation(console_native::coord(0,juniourJudge::maxRow_P*verticalSpace_C+AreaID)),&lt;br /&gt;
        console::write(string::create(emptyLineLenght_C,&amp;quot; &amp;quot;)).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    writeMessage:(positive AreaID,string FormatString,string ParameterString).&lt;br /&gt;
clauses&lt;br /&gt;
    writeMessage(AreaID,FormatString,ParameterString):-&lt;br /&gt;
        console::setLocation(console_native::coord(0, juniourJudge::maxRow_P*verticalSpace_C+AreaID)),&lt;br /&gt;
        console::writef(FormatString,ParameterString).&lt;br /&gt;
 &lt;br /&gt;
end implement humanInterface&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 5]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_4&amp;diff=2566</id>
		<title>Tutorial Project. Release 4</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Tutorial_Project._Release_4&amp;diff=2566"/>
		<updated>2011-04-01T13:37:24Z</updated>

		<summary type="html">&lt;p&gt;Victor Yukhtenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{PolylineTemplateEn&lt;br /&gt;
|goal=&lt;br /&gt;
To demonstrate the features of the Visual Prolog programming language and simple ways of programming:&lt;br /&gt;
|goalContent=&lt;br /&gt;
*The use of the inheritance mechanism.&lt;br /&gt;
|code=&lt;br /&gt;
*The structure of the class computer dramatically changed – new classes computerBrane and GenericComputer been created; &lt;br /&gt;
* Due to an inefficient algorithm for the computer game field size more than 36 cells (6x6, for example) to install not recommended.&lt;br /&gt;
|functionality=&lt;br /&gt;
No changes.&lt;br /&gt;
|install={{PolylineInstall}}&lt;br /&gt;
&lt;br /&gt;
|open=&lt;br /&gt;
{{Polyline1_10Open|project=&amp;#039;&amp;#039;&amp;#039;Examples\Polyline\Polyline4\Polyline4.prj&amp;#039;&amp;#039;&amp;#039;}}&lt;br /&gt;
&lt;br /&gt;
{{Polyline1-06Copy_Paste}}&lt;br /&gt;
|run=Run the application using the “E” of the IDE or run the executable at the directory EXE.&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
/************************************************************&lt;br /&gt;
Written by Victor Yukhtenko&lt;br /&gt;
&lt;br /&gt;
SpbSolutions/Examples/Polyline&lt;br /&gt;
&lt;br /&gt;
Predicates, which represent the strategy&lt;br /&gt;
    neighbour_nd,&lt;br /&gt;
    neighbourOutOfPolyLine_nd,&lt;br /&gt;
    resolveStep,&lt;br /&gt;
    successfulStep,&lt;br /&gt;
    stepCandidate&lt;br /&gt;
based on solutions proposed by Elena Efimova&lt;br /&gt;
************************************************************/&lt;br /&gt;
goal&lt;br /&gt;
    mainExe::run(main::run).&lt;br /&gt;
&lt;br /&gt;
/*******************&lt;br /&gt;
 Class Main&lt;br /&gt;
*******************/&lt;br /&gt;
implement main&lt;br /&gt;
    open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;main&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    run():-&lt;br /&gt;
        console::init(),   &lt;br /&gt;
        game::run().&lt;br /&gt;
 &lt;br /&gt;
end implement main&lt;br /&gt;
 &lt;br /&gt;
class game&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    run:().&lt;br /&gt;
end class game&lt;br /&gt;
 &lt;br /&gt;
implement game&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;game&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    playerNo_V:positive:=1.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    run():-&lt;br /&gt;
        humanInterface::announceStartUp(),&lt;br /&gt;
        PlayerType=humanInterface::getInput(humanInterface::playerType_S,toString(playerNo_V)),&lt;br /&gt;
        not(PlayerType=&amp;quot;&amp;quot;),&lt;br /&gt;
        try&lt;br /&gt;
            Player=createPlayerObject(toTerm(PlayerType)),&lt;br /&gt;
            seniourJudge::addPlayer(Player),&lt;br /&gt;
            playerNo_V:=playerNo_V+1&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            humanInterface::announceManagerError(humanInterface::errorPlayerType_S)&lt;br /&gt;
        end try,&lt;br /&gt;
        !,&lt;br /&gt;
        run().&lt;br /&gt;
    run():-&lt;br /&gt;
        startingPlayer().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    playListMember:()-&amp;gt;string nondeterm.&lt;br /&gt;
clauses&lt;br /&gt;
    playListMember()=PlayersListMember:-&lt;br /&gt;
        I = std::fromTo(1, list::length(seniourJudge::players_V)),&lt;br /&gt;
            Player=list::nth(I-1,seniourJudge::players_V),&lt;br /&gt;
            PlayersListMember=string::format(&amp;quot;\n% - %&amp;quot;,I,Player:name).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    startingPlayer:().&lt;br /&gt;
clauses&lt;br /&gt;
    startingPlayer():-&lt;br /&gt;
        not(seniourJudge::players_V=[]) and not(seniourJudge::players_V=[_SiglePlayer]),&lt;br /&gt;
        findAll(PlayListMember,PlayListMember=playListMember(),PlayList),&lt;br /&gt;
        PlayListStr=string::concatList(PlayList),&lt;br /&gt;
        StartingPlayerStr=humanInterface::getInput(humanInterface::startingPlayer_S,PlayListStr),&lt;br /&gt;
        not(StartingPlayerStr=&amp;quot;&amp;quot;), &lt;br /&gt;
        try&lt;br /&gt;
            StartingPlayer=toTerm(StartingPlayerStr),&lt;br /&gt;
            !,&lt;br /&gt;
            startGame(StartingPlayer)&lt;br /&gt;
        catch _TraceID1 do&lt;br /&gt;
            humanInterface::announceManagerError(humanInterface::errorMustBeNumber_S),&lt;br /&gt;
            !,&lt;br /&gt;
            startingPlayer()&lt;br /&gt;
        end try.&lt;br /&gt;
    startingPlayer().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    startGame:(positive).&lt;br /&gt;
clauses&lt;br /&gt;
    startGame(StartingPlayer):-&lt;br /&gt;
        try&lt;br /&gt;
            Player=list::nth(StartingPlayer-1,seniourJudge::players_V), % list::nth(...) needs unsigned&lt;br /&gt;
            !,&lt;br /&gt;
            seniourJudge::play(Player)&lt;br /&gt;
        catch _Trace_D do    &lt;br /&gt;
            humanInterface::announceManagerError(humanInterface::errorStartingPlayer_S),&lt;br /&gt;
            !&lt;br /&gt;
        end try,&lt;br /&gt;
        !,&lt;br /&gt;
        startingPlayer().&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    createPlayerObject:(positive)-&amp;gt;player.&lt;br /&gt;
clauses&lt;br /&gt;
    createPlayerObject(1)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=human::new().&lt;br /&gt;
    createPlayerObject(2)=Player:-&lt;br /&gt;
        !,&lt;br /&gt;
        Player=computer::new().&lt;br /&gt;
    createPlayerObject(_)=_Player:-&lt;br /&gt;
        exception::raise(classInfo,wrongInputException,[]).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    wrongInputException:exception.&lt;br /&gt;
clauses&lt;br /&gt;
    wrongInputException&lt;br /&gt;
        (&lt;br /&gt;
        classInfo,&lt;br /&gt;
        predicate_Name(),&lt;br /&gt;
        &amp;quot;&amp;quot;&lt;br /&gt;
        ).&lt;br /&gt;
 &lt;br /&gt;
end implement game&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Class seniorJudge&lt;br /&gt;
************************/&lt;br /&gt;
class seniourJudge&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    players_V:player*.&lt;br /&gt;
    inProgress_V:boolean.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    play:(player CurrentPlayer).&lt;br /&gt;
    addPlayer:(player NextPlayer).&lt;br /&gt;
end class seniourJudge&lt;br /&gt;
 &lt;br /&gt;
implement seniourJudge&lt;br /&gt;
open core, humanInterface&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    players_V:player*:=[].&lt;br /&gt;
    inProgress_V:boolean:=false.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    play(Player):-&lt;br /&gt;
        inProgress_V=false,&lt;br /&gt;
        humanInterface::showStage(),&lt;br /&gt;
        inProgress_V:=true,&lt;br /&gt;
        Player:move(),&lt;br /&gt;
        humanInterface::announceStarter(Player:name),&lt;br /&gt;
        play(Player),&lt;br /&gt;
        !.&lt;br /&gt;
    play(Player):-&lt;br /&gt;
        juniourJudge::isGameOver(),&lt;br /&gt;
        !,&lt;br /&gt;
        Player:announceWin(),&lt;br /&gt;
        foreach (Participant=list::getMember_nd(players_V) and not(Participant=Player)) do&lt;br /&gt;
            Participant:announceLoss()&lt;br /&gt;
        end foreach,&lt;br /&gt;
        inProgress_V:=false,&lt;br /&gt;
        juniourJudge::reset().&lt;br /&gt;
    play(Player):-&lt;br /&gt;
        NextPlayer=nextPlayer(Player),&lt;br /&gt;
        NextPlayer:move(),&lt;br /&gt;
        !,&lt;br /&gt;
        play(NextPlayer).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    addPlayer(NextPlayer):-&lt;br /&gt;
        players_V:=list::append(players_V,[NextPlayer]).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    nextPlayer:(player CurrentPlayer)-&amp;gt;player NextPlayer.&lt;br /&gt;
clauses&lt;br /&gt;
    nextPlayer(Player)=NextPlayer:-&lt;br /&gt;
        Index=list::tryGetIndex(Player,players_V),&lt;br /&gt;
        NextPlayer=list::tryGetNth(Index+1,players_V),&lt;br /&gt;
        !.&lt;br /&gt;
    nextPlayer(_Player)=list::nth(0,players_V).&lt;br /&gt;
 &lt;br /&gt;
end implement seniourJudge&lt;br /&gt;
 &lt;br /&gt;
/************************&lt;br /&gt;
  Class juniourJudge&lt;br /&gt;
************************/&lt;br /&gt;
class juniourJudge&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    cell = c(positive,positive).&lt;br /&gt;
    stepType_D=&lt;br /&gt;
        ordinary_S;&lt;br /&gt;
        winner_S.&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    maxRow_P:positive.&lt;br /&gt;
    maxColumn_P:positive.&lt;br /&gt;
    polyline_P:cell*.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    neighbour_nd: (cell,cell) nondeterm (i,o) (i,i).&lt;br /&gt;
    neighbourOutOfPolyLine_nd:(cell,cell)-&amp;gt;cell nondeterm.&lt;br /&gt;
    set: (string ).&lt;br /&gt;
    isGameOver:() determ.&lt;br /&gt;
    reset:().&lt;br /&gt;
 &lt;br /&gt;
end class juniourJudge&lt;br /&gt;
 &lt;br /&gt;
implement juniourJudge&lt;br /&gt;
open core, humanInterface&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;JuniourJudge&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
class facts&lt;br /&gt;
    maxRow_P:positive:=6.&lt;br /&gt;
    maxColumn_P:positive:=6.&lt;br /&gt;
    polyline_P:cell*:=[].&lt;br /&gt;
    endOfGame_V:boolean:=false.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    isGameOver():-&lt;br /&gt;
        endOfGame_V=true.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    set(InputString):-&lt;br /&gt;
        Cell=toTerm(InputString),&lt;br /&gt;
        handleInput (Cell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    reset():-&lt;br /&gt;
        juniourJudge:: polyline_P:=[],&lt;br /&gt;
        juniourJudge::endOfGame_V:=false.&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    handleInput:(juniourJudge::cell).&lt;br /&gt;
clauses&lt;br /&gt;
    handleInput(Cell):-&lt;br /&gt;
        list::isMember(Cell,polyline_P),&lt;br /&gt;
        try &lt;br /&gt;
            _=makePolyLine(Cell,polyline_P) % it will be an exception if wrong Cell, but we ignore it by failing&lt;br /&gt;
        catch _TraceID do&lt;br /&gt;
            fail&lt;br /&gt;
        end try,&lt;br /&gt;
        !,&lt;br /&gt;
        endOfGame_V:=true,&lt;br /&gt;
        humanInterface::showStep(Cell,winner_S).&lt;br /&gt;
    handleInput (Cell):-&lt;br /&gt;
        polyline_P:=makePolyLine(Cell,polyline_P),&lt;br /&gt;
        !,&lt;br /&gt;
        humanInterface::showStep(Cell,ordinary_S).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    makePolyLine: (cell,cell*)-&amp;gt; cell* multi.&lt;br /&gt;
clauses&lt;br /&gt;
    makePolyLine(c(X,Y),[])=[c(X,Y)]:-&lt;br /&gt;
        X&amp;gt;0,X&amp;lt;=maxColumn_P,&lt;br /&gt;
        Y&amp;gt;0,Y&amp;lt;=maxRow_P,&lt;br /&gt;
        !.&lt;br /&gt;
    makePolyLine(NewCell,[SingleCell])=[NewCell,SingleCell]:-&lt;br /&gt;
        neighbour_nd(SingleCell, NewCell),&lt;br /&gt;
        !.&lt;br /&gt;
    makePolyLine(NewCell,[Left, RestrictingCell | PolyLineTail])=[NewCell, Left, RestrictingCell | PolyLineTail]:-&lt;br /&gt;
        NewCell=neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    makePolyLine(NewCell,PolyLine)=list::reverse([NewCell,Left, RestrictingCell | PolyLineTail]):-&lt;br /&gt;
        [Left, RestrictingCell | PolyLineTail]= list::reverse(PolyLine),&lt;br /&gt;
        NewCell=neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    makePolyLine(NewCell,_PolyLine)= _PolyLine1:-&lt;br /&gt;
        exception::raise(classInfo,wrongStepException,[namedValue(&amp;quot;data&amp;quot;,string(toString(NewCell)))]).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    wrongStepException:exception.&lt;br /&gt;
clauses&lt;br /&gt;
    wrongStepException&lt;br /&gt;
        (&lt;br /&gt;
        classInfo,&lt;br /&gt;
        predicate_Name(),&lt;br /&gt;
       &amp;quot;the point % can not prolong the polyline!&amp;quot;&lt;br /&gt;
        ).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    neighbourOutOfPolyLine_nd(Cell,RestrictingCell)=NewCell:-&lt;br /&gt;
        neighbour_nd(Cell,NewCell),&lt;br /&gt;
            not(NewCell = RestrictingCell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    neighbour_nd(c(X, Y), c(X + 1, Y)):- X &amp;lt; maxColumn_P.        &lt;br /&gt;
    neighbour_nd(c(X, Y), c(X, Y + 1)):- Y &amp;lt; maxrow_P.            &lt;br /&gt;
    neighbour_nd(c(X, Y), c(X - 1, Y)):- X &amp;gt; 1.&lt;br /&gt;
    neighbour_nd(c(X, Y), c(X, Y - 1)):- Y &amp;gt; 1.    &lt;br /&gt;
 &lt;br /&gt;
end implement juniourJudge&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Interface Player&lt;br /&gt;
******************************************/&lt;br /&gt;
interface player&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    move:().&lt;br /&gt;
    announceWin:().&lt;br /&gt;
    announceLoss:().&lt;br /&gt;
 &lt;br /&gt;
properties&lt;br /&gt;
    name:string.&lt;br /&gt;
 &lt;br /&gt;
end interface player&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class human&lt;br /&gt;
******************************************/&lt;br /&gt;
class human:player&lt;br /&gt;
open core&lt;br /&gt;
end class human&lt;br /&gt;
 &lt;br /&gt;
implement human&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    name:string:=string::format(&amp;quot;Hum_%&amp;quot;,toString(This)).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        Name=humanInterface::getInput(humanInterface::playerName_S,name),&lt;br /&gt;
        if not(Name=&amp;quot;&amp;quot;) then&lt;br /&gt;
            name:=Name&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    move():-&lt;br /&gt;
        InputString=humanInterface::getInput(humanInterface::playerStep_S),&lt;br /&gt;
        try&lt;br /&gt;
            juniourJudge::set(InputString)&lt;br /&gt;
        catch TraceID do&lt;br /&gt;
            handleException(TraceID),&lt;br /&gt;
            fail&lt;br /&gt;
        end try,&lt;br /&gt;
        !.&lt;br /&gt;
    move():-&lt;br /&gt;
        move().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin():-&lt;br /&gt;
        humanInterface::announceWin(name).&lt;br /&gt;
 &lt;br /&gt;
    announceLoss():-&lt;br /&gt;
        humanInterface::announceLoss(name).&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    handleException:(exception::traceId TraceID).&lt;br /&gt;
clauses&lt;br /&gt;
    handleException(TraceID):-&lt;br /&gt;
        foreach Descriptor=exception::getDescriptor_nd(TraceID) do&lt;br /&gt;
            Descriptor = exception::descriptor(&lt;br /&gt;
                _ClassInfo1,&lt;br /&gt;
                exception::exceptionDescriptor(_ClassInfo2,_PredicateName,Description),&lt;br /&gt;
                _Kind,&lt;br /&gt;
                ExtraInfo,&lt;br /&gt;
                _GMTTime,&lt;br /&gt;
                _ExceptionDescription,&lt;br /&gt;
                _ThreadId),&lt;br /&gt;
            if&lt;br /&gt;
                ExtraInfo=[namedValue(&amp;quot;data&amp;quot;,string(CellPointer))]&lt;br /&gt;
            then&lt;br /&gt;
                ErrorMsg=string::format(Description,CellPointer),&lt;br /&gt;
                humanInterface::announceError(ErrorMsg)&lt;br /&gt;
            else&lt;br /&gt;
                humanInterface::announceError(&amp;quot;&amp;quot;)&lt;br /&gt;
            end if&lt;br /&gt;
        end foreach.&lt;br /&gt;
 &lt;br /&gt;
end implement human&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class computer&lt;br /&gt;
******************************************/&lt;br /&gt;
class computer:player&lt;br /&gt;
end class computer&lt;br /&gt;
 &lt;br /&gt;
implement computer&lt;br /&gt;
    inherits genericComputer&lt;br /&gt;
end implement computer&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class genericComputer&lt;br /&gt;
******************************************/&lt;br /&gt;
interface genericComputer&lt;br /&gt;
    supports player&lt;br /&gt;
    supports polyLineBrain&lt;br /&gt;
 &lt;br /&gt;
end interface genericComputer&lt;br /&gt;
 &lt;br /&gt;
class genericComputer:genericComputer&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
end class genericComputer&lt;br /&gt;
 &lt;br /&gt;
implement genericComputer&lt;br /&gt;
    inherits polyLineBrain1&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
facts&lt;br /&gt;
    name:string:=string::format(&amp;quot;Cmp_%&amp;quot;,toString(This)).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    new():-&lt;br /&gt;
        Name=humanInterface::getInput(humanInterface::playerName_S,name),&lt;br /&gt;
        if not(Name=&amp;quot;&amp;quot;) then&lt;br /&gt;
            name:=Name&lt;br /&gt;
        end if.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    move():-&lt;br /&gt;
        humanInterface::announceThinker(name),&lt;br /&gt;
        Cell=resolveStep(),&lt;br /&gt;
        juniourJudge::set(toString(Cell)).&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    resolveStep:()-&amp;gt;juniourJudge::cell.&lt;br /&gt;
clauses&lt;br /&gt;
    resolveStep()=Cell:-&lt;br /&gt;
        Cell=successfulStep(juniourJudge::polyline_P),&lt;br /&gt;
        !.&lt;br /&gt;
    resolveStep()=Cell:-&lt;br /&gt;
        Cell=randomStep(),&lt;br /&gt;
        !.&lt;br /&gt;
    resolveStep()=juniourJudge::c(X+1,Y+1):-&lt;br /&gt;
        X=math::random(juniourJudge::maxColumn_P-1),&lt;br /&gt;
        Y=math::random(juniourJudge::maxRow_P-1).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    stepCandidate([Cell],[Cell,NewCell], NewCell):-&lt;br /&gt;
        juniourJudge::neighbour_nd(Cell, NewCell).&lt;br /&gt;
    stepCandidate([Left, RestrictingCell | PolyLine],[NewCell,Left, RestrictingCell| PolyLine], NewCell):-&lt;br /&gt;
        NewCell=juniourJudge::neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
    stepCandidate(PolyLine,list::reverse([NewCell,Left, RestrictingCell |PolyLineTail]),NewCell):-&lt;br /&gt;
        [Left, RestrictingCell |PolyLineTail] = list::reverse(PolyLine),&lt;br /&gt;
        NewCell=juniourJudge::neighbourOutOfPolyLine_nd(Left,RestrictingCell).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin():-&lt;br /&gt;
        humanInterface::announceWin(name).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceLoss():-&lt;br /&gt;
        humanInterface::announceLoss(name).&lt;br /&gt;
 &lt;br /&gt;
end implement genericComputer&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Interface polylineBrain&lt;br /&gt;
******************************************/&lt;br /&gt;
interface polylineBrain&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    notDefinedPredicate_C=&amp;quot;The predicate is not defined. Must be defined in the daughter class. &amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    stepCandidate: (juniourJudge::cell*,juniourJudge::cell* [out],juniourJudge::cell [out]) nondeterm.&lt;br /&gt;
    successfulStep: (juniourJudge::cell*)-&amp;gt;juniourJudge::cell nondeterm.&lt;br /&gt;
    randomStep:()-&amp;gt;juniourJudge::cell determ.&lt;br /&gt;
 &lt;br /&gt;
end interface polyLineBrain&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class polylineBrain1&lt;br /&gt;
******************************************/&lt;br /&gt;
class polyLineBrain1:polyLineBrain&lt;br /&gt;
open core&lt;br /&gt;
predicates&lt;br /&gt;
    classInfo : core::classInfo.&lt;br /&gt;
 &lt;br /&gt;
end class polyLineBrain1&lt;br /&gt;
 &lt;br /&gt;
implement polyLineBrain1&lt;br /&gt;
open core, exception&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    className = &amp;quot;polyLineBrain1&amp;quot;.&lt;br /&gt;
    classVersion = &amp;quot;1.0&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    classInfo(className, classVersion).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    successfulStep(PolyLine)=BestMove:-&lt;br /&gt;
        This:stepCandidate(PolyLine, _PolyLine1,BestMove),&lt;br /&gt;
        list::isMember(BestMove, PolyLine),&lt;br /&gt;
        !.&lt;br /&gt;
    successfulStep(PolyLine)=Cell:-&lt;br /&gt;
        This:stepCandidate(PolyLine, PolyLine1,Cell),&lt;br /&gt;
            not(_=successfulStep(PolyLine1)).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    randomStep()=Cell:-&lt;br /&gt;
        findAll(NewCell,This:stepCandidate(juniourJudge::polyline_P,_Polyline1, NewCell),CellCandidateListWithDuplicates),&lt;br /&gt;
        CellCandidateList=list::removeDuplicates(CellCandidateListWithDuplicates),&lt;br /&gt;
        not(CellCandidateList=[]),&lt;br /&gt;
        NoOfVariants=list::length(CellCandidateList),&lt;br /&gt;
        ChoiceNo=math::random(NoOfVariants-1),&lt;br /&gt;
        Cell=list::nth(ChoiceNo+1,CellCandidateList).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    stepCandidate(_Cell,_PolyLine,_Move):-&lt;br /&gt;
        common_exception::raise_error(classinfo,predicate_name(),notDefinedPredicate_C).&lt;br /&gt;
 &lt;br /&gt;
end implement polylineBrain1&lt;br /&gt;
 &lt;br /&gt;
/******************************************&lt;br /&gt;
  Class HumanInterface&lt;br /&gt;
******************************************/&lt;br /&gt;
class humanInterface&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    announceStartUp:().&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    showStage:().&lt;br /&gt;
    showStep:(juniourJudge::cell,juniourJudge::stepType_D).&lt;br /&gt;
    getInput:(inputType_D,string StringParameter)-&amp;gt;string InputString.&lt;br /&gt;
    getInput:(inputType_D)-&amp;gt;string InputString.&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    announceManagerError:(choiceError_D).&lt;br /&gt;
 &lt;br /&gt;
predicates&lt;br /&gt;
    announceStarter:(string Name).&lt;br /&gt;
    announceThinker:(string Name).&lt;br /&gt;
    announceWin:(string Name).&lt;br /&gt;
    announceLoss:(string Name).&lt;br /&gt;
    announceError:(string Description).&lt;br /&gt;
    announceError:().&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    choiceError_D=&lt;br /&gt;
        errorPlayerType_S;&lt;br /&gt;
        errorMustBeNumber_S;&lt;br /&gt;
        errorstartingPlayer_S.&lt;br /&gt;
 &lt;br /&gt;
domains&lt;br /&gt;
    inputType_D=&lt;br /&gt;
        playerStep_S;&lt;br /&gt;
        playerType_S;&lt;br /&gt;
        playerName_S;&lt;br /&gt;
        startingPlayer_S;&lt;br /&gt;
        searchDepth_S.&lt;br /&gt;
 &lt;br /&gt;
end class humanInterface&lt;br /&gt;
 &lt;br /&gt;
implement humanInterface&lt;br /&gt;
open core&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    cellMarkedOrdinary_C=&amp;quot;*&amp;quot;.&lt;br /&gt;
    cellMarkedWinner_C=&amp;quot;O&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
constants % messages&lt;br /&gt;
    thinker_C=&amp;quot;% is thinking ...&amp;quot;.&lt;br /&gt;
    beginner_C=&amp;quot;First move done by: %&amp;quot;.&lt;br /&gt;
    error_C=&amp;quot;Error, % &amp;quot;.&lt;br /&gt;
    congratulation_C=&amp;quot;Player % won!&amp;quot;.&lt;br /&gt;
    sorryLoss_C=&amp;quot;%,  Sorry, you loss :-(&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
    playerStep_C=&amp;quot;Please enter your move as c(X,Y): &amp;quot;.&lt;br /&gt;
    playerType_C=&amp;quot;\nPlayer #%s. Please enter the player type (1-human, 2-computer, Enter - end of choice):&amp;quot;.&lt;br /&gt;
    playerName_C=&amp;quot;\nPlease assign the name to the player (% proposed):&amp;quot;.&lt;br /&gt;
    startingPlayer_C=&amp;quot;\nWho moves the first (PlayerNo or Enter - end of the game)?:&amp;quot;.&lt;br /&gt;
    searchDepth_C=&amp;quot;\nDefine the depth of the search (% - by default)?? &amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
    errorPlayerType_C=&amp;quot;\nNo such player type exists! Enter - repeat input:&amp;quot;.&lt;br /&gt;
    errorMustBeNumber_C=&amp;quot;\nMust be number! Please repeat input:&amp;quot;.&lt;br /&gt;
    errorstartingPlayer_C=&amp;quot;\nNo such Player exiasts! Please repeat input:&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
constants&lt;br /&gt;
    verticalSpace_C=2.&lt;br /&gt;
    horizontalSpace_C=3.&lt;br /&gt;
    emptyLineLenght_C=80.&lt;br /&gt;
 &lt;br /&gt;
constants % Position of Line&lt;br /&gt;
    starterLine_C=1.&lt;br /&gt;
    announceLine_C=starterLine_C+1.&lt;br /&gt;
    actionLine_C=announceLine_C+1.&lt;br /&gt;
    polylineLine_C=actionLine_C+1.&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    getInput(InputType)=Input:-&lt;br /&gt;
        Input=getInput(InputType,&amp;quot;&amp;quot;).&lt;br /&gt;
 &lt;br /&gt;
    getInput(InputType,StringParameter)=Input:-&lt;br /&gt;
        inputInvitation(InputType,StringParameter),&lt;br /&gt;
        Input = console::readLine(),&lt;br /&gt;
        console::clearInput().&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    inputInvitation:(inputType_D,string StringParameter).&lt;br /&gt;
clauses&lt;br /&gt;
    inputInvitation(playerStep_S,_StringParameter):-&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(actionLine_C,&amp;quot;%&amp;quot;,playerStep_C).&lt;br /&gt;
    inputInvitation(playerName_S,StringParameter):-&lt;br /&gt;
        console::writef(playerName_C,StringParameter).&lt;br /&gt;
    inputInvitation(playerType_S,StringParameter):-&lt;br /&gt;
        console::writef(playerType_C,StringParameter).&lt;br /&gt;
    inputInvitation(startingPlayer_S,StringParameter):-&lt;br /&gt;
        console::write(StringParameter,startingPlayer_C).&lt;br /&gt;
    inputInvitation(searchDepth_S,StringParameter):-&lt;br /&gt;
        console::writef(searchDepth_C,StringParameter).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    showStage():-&lt;br /&gt;
        console::clearOutput(),&lt;br /&gt;
        foreach I = std::fromTo(1, juniourJudge::maxColumn_P) do&lt;br /&gt;
            console::setLocation(console_native::coord(horizontalSpace_C*I, 0)), &lt;br /&gt;
            console::write(I)&lt;br /&gt;
        end foreach,&lt;br /&gt;
        foreach J = std::fromTo(1, juniourJudge::maxRow_P) do    &lt;br /&gt;
            console::setLocation(console_native::coord(0, verticalSpace_C*J)), &lt;br /&gt;
            console::write(J)&lt;br /&gt;
        end foreach.&lt;br /&gt;
&lt;br /&gt;
clauses&lt;br /&gt;
    showStep(juniourJudge::c(X,Y),_Type):-&lt;br /&gt;
        console::setLocation(console_native::coord(horizontalSpace_C*X, verticalSpace_C*Y)),&lt;br /&gt;
        fail.&lt;br /&gt;
    showStep(_Cell,juniourJudge::ordinary_S):-&lt;br /&gt;
        console::write(cellMarkedOrdinary_C).&lt;br /&gt;
    showStep(_Cell,juniourJudge::winner_S):-&lt;br /&gt;
        console::write(cellMarkedWinner_C).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceStartUp():-&lt;br /&gt;
        console::clearOutput().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceStarter(Name):-&lt;br /&gt;
        clearMessageArea(starterLine_C),&lt;br /&gt;
        writeMessage(starterLine_C,beginner_C,Name).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceManagerError(errorPlayerType_S):-&lt;br /&gt;
        console::write(errorPlayerType_C),&lt;br /&gt;
        _=console::readLine().&lt;br /&gt;
    announceManagerError(errorMustBeNumber_S):-&lt;br /&gt;
        console::write(errorMustBeNumber_C).&lt;br /&gt;
    announceManagerError(errorstartingPlayer_S):-&lt;br /&gt;
        console::write(errorstartingPlayer_C).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceError():-&lt;br /&gt;
        announceError(&amp;quot;&amp;quot;).&lt;br /&gt;
 &lt;br /&gt;
    announceError(ErrorText):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,error_C,ErrorText).&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceWin(Name):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,congratulation_C,Name),&lt;br /&gt;
        showPolyLine(),&lt;br /&gt;
        _ = console::readLine().&lt;br /&gt;
 &lt;br /&gt;
    announceLoss(Name):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        writeMessage(announceLine_C,sorryLoss_C,Name),&lt;br /&gt;
        showPolyLine(),&lt;br /&gt;
        _ = console::readLine().&lt;br /&gt;
 &lt;br /&gt;
clauses&lt;br /&gt;
    announceThinker(Name):-&lt;br /&gt;
        clearMessageArea(announceLine_C),&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(actionLine_C,thinker_C,Name).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    showPolyLine:().&lt;br /&gt;
clauses&lt;br /&gt;
    showPolyLine():-&lt;br /&gt;
        clearMessageArea(actionLine_C),&lt;br /&gt;
        writeMessage(polylineLine_C,&amp;quot;%&amp;quot;,toString(juniourJudge::polyline_P)).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    clearMessageArea:(positive AreaID).&lt;br /&gt;
clauses&lt;br /&gt;
    clearMessageArea(AreaID):-&lt;br /&gt;
        console::setLocation(console_native::coord(0,juniourJudge::maxRow_P*verticalSpace_C+AreaID)),&lt;br /&gt;
        console::write(string::create(emptyLineLenght_C,&amp;quot; &amp;quot;)).&lt;br /&gt;
 &lt;br /&gt;
class predicates&lt;br /&gt;
    writeMessage:(positive AreaID,string FormatString,string ParameterString).&lt;br /&gt;
clauses&lt;br /&gt;
    writeMessage(AreaID,FormatString,ParameterString):-&lt;br /&gt;
        console::setLocation(console_native::coord(0, juniourJudge::maxRow_P*verticalSpace_C+AreaID)),&lt;br /&gt;
        console::writef(FormatString,ParameterString).&lt;br /&gt;
 &lt;br /&gt;
end implement humanInterface&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|rusver=&lt;br /&gt;
[[ru:Учебный Проект. Релиз 4]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
</feed>