Skip to content

Commit 48bb357

Browse files
Fix1
1 parent f1232a3 commit 48bb357

File tree

5 files changed

+950
-0
lines changed

5 files changed

+950
-0
lines changed

CleanCommonExamples.cmd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
chcp 866
2+
if exist dd.bat del dd.bat
3+
chcp 1251
4+
dir /s/b vip7*.dll >>dd.bat
5+
dir /s/b *.obj >>dd.bat
6+
dir /s/b *.env >>dd.bat
7+
dir /s/b *.map >>dd.bat
8+
dir /s/b *.bro >>dd.bat
9+
dir /s/b *.rlt >>dd.bat
10+
dir /s/b *.rc >>dd.bat
11+
dir /s/b *.deb >>dd.bat
12+
dir /s/b *.obj.options >>dd.bat
13+
dir /s/b *.res >>dd.bat
14+
dir /s/b *.scope >>dd.bat
15+
dir /s/b *.scopeinfo >>dd.bat
16+
dir /s/b *.tmp >>dd.bat
17+
dir /s/b $*.* >>dd.bat
18+
dir /s/b @*.* >>dd.bat
19+
dir /s/b capdos.* >>dd.bat
20+
dir /s/b dd.* >>dd.bat
21+
..\SpbVipTools\Bin\delfiles.exe dd.bat
22+
del dd.bat
23+
pause

Polyline/CleanPolyline.cmd

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
chcp 866
2+
if exist dd.bat del dd.bat
3+
chcp 1251
4+
dir /s/b vip7*.dll >>dd.bat
5+
dir /s/b *.obj >>dd.bat
6+
dir /s/b *.map >>dd.bat
7+
dir /s/b *.bro >>dd.bat
8+
dir /s/b *.rlt >>dd.bat
9+
dir /s/b *.rc >>dd.bat
10+
dir /s/b *.deb >>dd.bat
11+
dir /s/b *.scope >>dd.bat
12+
dir /s/b *.obj.options >>dd.bat
13+
dir /s/b *.res >>dd.bat
14+
dir /s/b *.scopeinfo >>dd.bat
15+
dir /s/b *.tmp >>dd.bat
16+
dir /s/b $*.* >>dd.bat
17+
dir /s/b @*.* >>dd.bat
18+
dir /s/b capdos.* >>dd.bat
19+
dir /s/b dd.* >>dd.bat
20+
..\..\SpbVipTools\Bin\delfiles.exe dd.bat
21+
del dd.bat
22+
pause

Polyline/ReadmeEn.html

Lines changed: 259 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+
<html xmlns="http://www.w3.org/1999/xhtml"><head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
4+
<title>Polyline Project Evolutions</title></head>
5+
<body>
6+
<h1>Polyline Project Evolutions</h1>
7+
<p><strong>Copyright (c) Victor Yukhtenko </strong></p>
8+
<h2>Motivation</h2>
9+
<p> This is an example of the evolution of the project development. A very easy game
10+
has been chosen as the basic idea. We do not know the initial name of
11+
this game so we call it Polyline.</p>
12+
<p>Each development step represented as the release, so you can see
13+
step by step the evolution of the application. Each release expands the
14+
functionality of the application, moving along the way the code is
15+
extended, modified and restructured or only restructured and modified. </p>
16+
<p>Looking carefully on the code of each release you can see technique
17+
of the using of the Visual Prolog and advanced tools. It can be used to
18+
study the Visual Prolog features. </p>
19+
<h2>Game description</h2>
20+
<p> The game is played on an M x N board. </p>
21+
<p>Game rules</p>
22+
<ul>
23+
<li> Each player on his turn adds a new point. The point must
24+
prolong the existing Polyline (or start the Polyline, if it doesn't
25+
exist) in the vertical or hirisontal direction only.</li>
26+
<li> The resulting Polyline must be non-interrupted and each move can be taken at any of end of the line.</li>
27+
<li> The player, which locks the line (the point is set on the polyline), wins.</li>
28+
</ul>
29+
<h2>Before you start</h2>
30+
<p>To build and study projects of series you must install Visual Prolog programming system.</p>
31+
<p>The reference information regarding the features depending on the
32+
vesrion of the Visual Prolog&nbsp; please see
33+
in the file <a href="VersionReference.html">VersionReference.html</a>.</p>
34+
<p>Short information regarding each release may be found in the table below.</p>
35+
<table id="table1" border="1" cellpadding="0" cellspacing="0">
36+
<tbody>
37+
<tr>
38+
<td><p align="center"><strong>Release</strong><strong> </strong></p></td>
39+
<td><p align="center"><strong>Short</strong><strong> Description </strong></p></td>
40+
<td><p align="center"><strong>User</strong><strong><br />
41+
Interface </strong></p></td>
42+
</tr>
43+
<tr>
44+
<td><p align="center">14</p></td>
45+
<td><p><span xml:lang="EN-US" lang="EN-US"><a href="#14">Demonstration of the interaction with components based on the pzl-Technology</a></span></p></td>
46+
<td><p align="center">Win</p></td>
47+
</tr>
48+
<tr>
49+
<td height="25"><p align="center">13</p></td>
50+
<td height="25"><p><a href="#13"><span xml:lang="EN-US" lang="EN-US">The demonstration of various ways and various techniques of the interaction with components placed to the DLLs</span></a> <span xml:lang="EN-US" lang="EN-US"></span></p></td>
51+
<td height="25"><p align="center">Win</p></td>
52+
</tr>
53+
<tr>
54+
<td height="25"><p align="center">12</p></td>
55+
<td height="25"><p><a href="#12"><span xml:lang="EN-US" lang="EN-US">Multiple projects with the User Interfaces - Windows. </span>The game dimension problem solved. </a></p></td>
56+
<td height="25"><p align="center">Win</p></td>
57+
</tr>
58+
<tr>
59+
<td height="25"><p align="center">11</p></td>
60+
<td height="25"><p><a href="#11"><span xml:lang="EN-US" lang="EN-US">Multiple project with the different User Interfaces - Console, ObjectConsole, Windows. </span>Use of Pro-based Libraries</a> </p></td>
61+
<td height="25"><p align="center">Console/Win</p></td>
62+
</tr>
63+
<tr>
64+
<td><p align="center">10</p></td>
65+
<td><p><a href="#10"><span xml:lang="EN-US" lang="EN-US">Code modified. Communication with players based on events. </span>NotificationAgency pack used. </a></p></td>
66+
<td><p align="center">Console </p></td>
67+
</tr>
68+
<tr>
69+
<td><p align="center">9</p></td>
70+
<td><p><a href="#9"><span xml:lang="EN-US" lang="EN-US">Code modified. Each class generates the Object. </span></a><span xml:lang="EN-US" lang="EN-US"></span></p></td>
71+
<td><p align="center">Console</p></td>
72+
</tr>
73+
<tr>
74+
<td><p align="center">8</p></td>
75+
<td><p><a href="#8"><span xml:lang="EN-US" lang="EN-US">Code modified. The structure of the project reorganized. </span>Each class placed to separate package. </a></p></td>
76+
<td><p align="center">Console</p></td>
77+
</tr>
78+
<tr>
79+
<td><p align="center">7 </p></td>
80+
<td><p><a href="#7"><span xml:lang="EN-US" lang="EN-US">MultiLanguage</span> <span xml:lang="EN-US" lang="EN-US">feature. The code reorganized. </span></a><span xml:lang="EN-US" lang="EN-US"></span></p></td>
81+
<td><p align="center">Console </p></td>
82+
</tr>
83+
<tr>
84+
<td><p align="center">6 </p></td>
85+
<td><p><a href="#6"><span xml:lang="EN-US" lang="EN-US">Multiple plays mode. Easy expansion of the list of players. </span>The size of the field mutable. The code reorganized. </a></p></td>
86+
<td><p align="center">Console </p></td>
87+
</tr>
88+
<tr>
89+
<td><p align="center">5 </p></td>
90+
<td><p><a href="#5"><span xml:lang="EN-US" lang="EN-US">Computer's move based on the prognosis on the depth <em>K</em> moves. </span>The code reorganized. </a></p></td>
91+
<td><p align="center">Console </p></td>
92+
</tr>
93+
<tr>
94+
<td><p align="center">4 </p></td>
95+
<td><p><a href="#4"><span xml:lang="EN-US" lang="EN-US">Safe computer's move - random. The code of the player-computer restructured. </span></a><span xml:lang="EN-US" lang="EN-US"></span></p></td>
96+
<td><p align="center">Console </p></td>
97+
</tr>
98+
<tr>
99+
<td><p align="center">3 </p></td>
100+
<td><p><a href="#3"><span xml:lang="EN-US" lang="EN-US">N players. The type of the player (computer or human) - by choice. </span></a><span xml:lang="EN-US" lang="EN-US"></span></p></td>
101+
<td><p align="center">Console </p></td>
102+
</tr>
103+
<tr>
104+
<td><p align="center">2 </p></td>
105+
<td><p><a href="#2"><span xml:lang="EN-US" lang="EN-US">Players - objects. The initial move of the computer - random. </span></a><span xml:lang="EN-US" lang="EN-US"></span></p></td>
106+
<td><p align="center">Console </p></td>
107+
</tr>
108+
<tr>
109+
<td><p align="center">1 </p></td>
110+
<td><p><a href="#1"><span xml:lang="EN-US" lang="EN-US">Players: computer and human. The initial move by choice. </span></a><span xml:lang="EN-US" lang="EN-US"></span></p></td>
111+
<td><p align="center">Console </p></td>
112+
</tr>
113+
</tbody>
114+
</table>
115+
<h2>Building notes </h2>
116+
<ol>
117+
<li>Releases 1-9 projects may be built one by one without any tricks.</li>
118+
<li>Since Release 10 all projects use <strong>SpbSolutions</strong> IDE variable, which must refere to the <span style="font-weight: bold;">SpbVipTools</span> directory.</li>
119+
<li>Since Release 11 some projects demonstrate building libraries, thuse user must have <strong>Microsoft lib.exe</strong> program tool (see details in the release appropriate <strong>Readme.htm</strong> file). </li>
120+
<li>Projects
121+
placed to the Release 14 (Polyline14) PzlBasedApplicaions folder need
122+
to run the registration procedure after buiding all projects placed to
123+
the <strong>Containers</strong> directory. This must be done using the Programs\pzlBasedApplication\<strong>RegisterComponents.cmd</strong> command file.</li>
124+
<li>Some
125+
Projects since Release 12 demonstrate and use the DLL creation. So
126+
these projects must be built using VIP CE only (please see details the
127+
file <a href="VersionReference.html">VersionReference.html</a>).</li>
128+
<li>All Polyline-related projects create the executable programs at Polyline\Execute folder.<br /></li>
129+
</ol>
130+
<h2>Comments to Releases </h2>
131+
<h3><a name="1" id="1"></a>Release 1 (Project PolyLine1)</h3>
132+
<p> The initial idea taken from the <a href="http://www.hardforum.ru/f141/">Prolog-related discussion forum</a> </p>
133+
<p>Author of the code is Elena Efimova. </p>
134+
<h3><a name="2" id="2"></a>Release 2 (Project PolyLine2) </h3>
135+
<ul>
136+
<li>If the computer makes the first move, then it is done random</li>
137+
<li> The human and computer models are object-generating classes</li>
138+
<li> Predicates, which relate to the human-machine interaction grouped to class HumanInterface</li><li>The size of the playing field set in the code 5x6.</li><li>The user interaface has the text (console) style. </li><li>Because of the inefficient way of the solution it is not recommended to set the the size bigger then 36 cells (6x6)</li></ul>
139+
<h3><a name="3" id="3"></a>Release 3 (Project PolyLine3)</h3>
140+
<ul>
141+
<li>It can be more then 2 players</li>
142+
<li> The type of each player (computer or human) is by choice </li>
143+
</ul>
144+
<h3><a name="4" id="4"></a>Release 4 (Project PolyLine4)</h3>
145+
<ul>
146+
<li>Computer model: if no safe move found, then the next move is random (maybe extremely unsuccessful) </li>
147+
<li> The structure of the class computer modified dramatically</li>
148+
</ul>
149+
<h3> <a name="5" id="5"></a>Release 5 (Project PolyLine5) </h3>
150+
<ul>
151+
<li>The size of the board is set 10 x 10 in the code</li>
152+
<li> Computer model: makes the prognosis on K steps forward</li>
153+
<li> Computer model: the parameter of the depth of the prognosis is by choice</li>
154+
</ul>
155+
<h3> <a name="6" id="6"></a>Release 6 (Project PolyLine6) </h3>
156+
<ul><li>It is possible to create many players, each player with the own strategy</li>
157+
<li> The size of the board mutable</li>
158+
<li> An easy inclusion of a new players</li>
159+
<li> Multiple games mode (recommended for computer models only) <br />
160+
</li>
161+
</ul>
162+
<h3><a name="7" id="7"></a>Release 7 (Project PolyLine7) </h3>
163+
<ul>
164+
<li>Using the CommandLine parameters in the code</li><li>Using CommandLine parameters in the IDE </li><li>Multilanguage feature.</li>
165+
<li> Indication of the process in the multi game mode</li>
166+
<li> Code reorganized.&nbsp;</li></ul><p style="font-weight: bold;">&nbsp;&nbsp;&nbsp; Build and Run notes </p><ul><li>The language of the application may be defined in the command line by the language indetifier: <ul><li> en - English</li><li> ru - Russian</li></ul></li><li>When
167+
running the program from the IDE, the parameter of the language must be
168+
placed to the field "Project Settings\Run Options\Run Arguments",
169+
available from menu "Project\Settings..."</li>
170+
</ul>
171+
<h3><a name="8" id="8"></a>Release 8 (Project PolyLine8) </h3>
172+
<p>Code reorganized. Each class now placed in the separate package</p>
173+
<h3><a name="9" id="9"></a>Release 9 (Project PolyLine9)</h3>
174+
<p>Code reorganized. Each class is dynamic class, which generates the object.</p>
175+
<h3> <a name="10" id="10"></a>Release 10 (Project PolyLine10) </h3>
176+
<ul>
177+
<li>Multi Game mode now can be repeated</li>
178+
<li> Code reorganized. Communication with Players based now on events.</li>
179+
<li> The Polyline10 Project uses the NotificationAgency Package, which is a part of the SpbVipTools.</li>
180+
<li> To build the Polyline10 project you must define the IDE valriable SpbSolutions as the path to the&nbsp;SpbVipTools directory.</li>
181+
</ul>
182+
<h3><a name="11" id="11"></a>Release 11 (Folder PolyLine11) </h3>
183+
<ul>
184+
<li> Release 11 is the set of projects, which has the same game
185+
logic organization, but differs by the User Interface type - &#1057;&#1086;nsole ,
186+
ObjectConsole, Windows. <br />
187+
the use of VIP-based libraries</li>
188+
<li> Some components are represented same time as the source code (.PRO) and as the libraries (.LIB).</li>
189+
</ul>
190+
<p> See more <a href="Polyline11/ReadmeEn.html">details at ...</a> </p>
191+
<h3><a name="12" id="12"></a>Release 12 (Folder PolyLine12)</h3>
192+
<p> The Release 11 projects family had the problem - the overloading of
193+
the call stack on some values of the multiplication
194+
TheSizeOfTheBoard*AmountOfRounds and appropriate breakdown of the
195+
application.</p>
196+
<p>The purpose of the Release 12 is to solve this problem. </p>
197+
<h5>The set of projects</h5>
198+
<p> The set of project in Release 12 differs from the set of projects of the Release11:</p>
199+
<ul>
200+
<li> First, Release 12 doesn't contain Console-based projects.</li>
201+
<li> Second, project ObjectWin contains now three
202+
variants ObjectWin0, ObjectWin1, ObjectWin2 and Projects ObjectWinLibX,
203+
where the UI is presented as the library. These variants show the
204+
phases of the modification of the code. </li>
205+
206+
</ul>
207+
<h5><strong> Functionality</strong></h5>
208+
<ul>
209+
<li> The behavior of applications of the Release 12 is the same as the behavior of applicaons of the Release 11</li>
210+
<li>
211+
The new test model of the Player Computer00 added. The only purpose of
212+
the creation of the model of the player Computer00 is to simulate the
213+
behavior of the application on the large amount of moves, which players
214+
make.</li>
215+
</ul> See more <a href="Polyline12/ReadmeEn.html">details at ...</a>
216+
<h3> <a name="13" id="13"></a>Release 13 (Folder PolyLine13) </h3>
217+
<h5>The set of projects</h5>
218+
<p> The Release 13 contains the set of strongly dependent projects -
219+
the project of the main application and projects of three DLLs, where
220+
DLL has the special project to build it.</p>
221+
<p> The set of projects contains:</p>
222+
<ul>
223+
<li> The Project ModelsDLL (generates the DLL), where models of
224+
the computer strategies of the game Computer0, Computer1, Computer2 are
225+
placed.</li>
226+
<li> The Project Computer3DLL (generates the DLL), where the model of the strategy Computer3 is placed.</li>
227+
<li>
228+
The Project HumanInterfaceDLL (generates the DLL), where classes
229+
related to the HumanInterface are placed. This DLL is called using the
230+
library, which used while building the main application. </li>
231+
<li>The Project Polyline13_ObjWindows - the project of the main executable application</li>
232+
<li> The same functionality</li>
233+
</ul>
234+
<h5>Functionality </h5>
235+
<p>The behavior of applications of the Release 13 is the same as the
236+
behavior of applications of the Release 11, 12. The only difference is
237+
the DLL-related violations exceptions reacting.</p><p> See more <a href="Polyline13/ReadmeEn.html">details at ...</a></p>
238+
<h3> <a name="14" id="14"></a>Release 14 (Folder PolyLine14) </h3>
239+
<h5>The set of projects</h5>
240+
<p>The Release 14 contains the set of projects, which demonstrates the
241+
different phases of the transformation of the application Polyline
242+
Release 13 to the application based on the Pzl-Technology (see
243+
http://wiki.visual-prolog.com/index.php?title=Category:VpPuZzle).</p>
244+
<p> The set of projects contains:</p>
245+
<ul>
246+
<li> The Project MonoApplicaion\Polyline14_ObjWindows_Mono.vipprj shows how classes are converted to pzl-Components.</li>
247+
<li>
248+
The Project MonoApplicaionLib\Polyline14_ObjWindowsLib.vipprj is the same project as
249+
MonoApplicaion\Polyline14_ObjWindows_Mono.vipprj, where HumanInterface and player Computer3
250+
represented as the libraries.</li>
251+
<li> The directory
252+
pzlBasedApplication contains again the set of projects - the main
253+
application Polyline14_ObjWindowsPzl.vipprj and the set of projects, where each project
254+
corresponds to the pzlContainer, where basic components of the
255+
application are placed.</li>
256+
</ul>
257+
<h5> Functionality</h5>
258+
<p> The behavior of applications of the Release 14 is the same.</p><p> See more <a href="Polyline14/ReadmeEn.html">details at ...</a></p>
259+
</body></html>

0 commit comments

Comments
 (0)