    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: Building the Board</title>
        <link>https://members.accu.org/index.php/articles/1020</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Programming Topics + CVu Journal Vol 12, #4 - Jul 2000</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c65/">Programming</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c77/">CVu</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c125/">124</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c65-125/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c65+125/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;Building the Board</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 03 July 2000 13:15:37 +01:00 or Mon, 03 July 2000 13:15:37 +01:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e18" id="d0e18"></a></h2>
</div>
<p>The board is composed of hexes which, in turn, are composed of
colored areas. The design of the hex was considered last issue. The
construction of hexes into a board will be addressed in this
column. In the previous column, the hex requirements were numbered.
To prevent confusion when referring to requirements in this and
subsequent columns, requirements will have both a number and a
subsystem. In this way, the first hex requirement would be
<tt class="literal">Hex-1</tt>, the first board requirement would
be <tt class="literal">Board-1</tt>, and a requirement which
effected both might be <tt class="literal">Hex/Board-1</tt>. So as
long as things are simpler now&hellip;</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e31" id="d0e31"></a>Board
Requirements</h2>
</div>
<p>The board is composed of hexes displayed in a specific pattern.
The initial board we will build will be composed of 19 hexes. The
hexes are laid out to form a board in the pattern shown in Figure
5. In this figure each number represents a hex.</p>
<div class="informaltable">
<table width="100%" border="0">
&lt;colgroup&gt;
&lt;col&gt;&lt;/colgroup&gt;
&lt;tbody&gt;
<tr>
<td align="center">
<pre class="literallayout">
 01
10  06
17  02  14
11  07
18  03  15
12  08
19  04  16
13  09
 05
</pre></td>
</tr>
<tr>
<td align="center"><span class="bold"><b>Figure 5</b></span></td>
</tr>
&lt;/tbody&gt;
</table>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e47" id="d0e47"></a>Requirement
Board-1:</h3>
</div>
<p>The board is composed of 19 hexes laid out in the pattern shown
in Figure 5.</p>
<p>The number of hexes in the board with 3, 4, and 5 color sections
is also predetermined. There is only 1 hex with 5 color sections, 6
hexes with 4 color sections, and 12 hexes with 3 color
sections.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e54" id="d0e54"></a>Requirement
Board-2:</h3>
</div>
<p>The board will be composed of the following mix of hexes: 1 hex
with 5 color sections, 6 hexes with 4 color sections, and 12 hexes
with 3 color sections.</p>
<p>The hexes that compose the board are selected randomly from
within this subset and placed into the board in the order shown in
Figure 5. In addition, the hexes are randomly rotated before being
placed into the board.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e61" id="d0e61"></a>Requirement
Board-3:</h3>
</div>
<p>The hexes are placed onto the board in the order shown in Figure
5. The hexes are generated randomly.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e66" id="d0e66"></a>Requirement
Board-4:</h3>
</div>
<p>As hexes are placed onto the board, they are rotated
randomly.</p>
<p>Because pieces move across the board from hex to hex, it is
important for the board to know which hex is a neighbor to another
hex and which faces of the two hexes are touching. Thus, the board
should respond to a query for the neighbor associated with a
specified face of a given hex.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e73" id="d0e73"></a>Requirement
Board-5:</h3>
</div>
<p>The board should be able to respond to a query for a neighbor
from a given face of a given hex.</p>
<p>When the game begins, players select three adjacent perimeter
hexes as their starting points. Once the first player selects three
hexes, the remaining possible positions are determined. Thus, the
board should be able to validate a given starting set of hexes and
be able to specify what groups of hexes are available for
starting.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e80" id="d0e80"></a>Requirement
Board-6:</h3>
</div>
<p>The board must be able to validate three passed hexes as a
starting position.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e85" id="d0e85"></a>Requirement
Board-7:</h3>
</div>
<p>The board must be able to identify available starting
positions.</p>
<p>Looking at the strategy that may be involved in playing the
game, it is quite possible that it would be important to identify
the location of certain sequences of colored areas, the diversity
of colored areas from a given starting area, the number of colored
areas between an edge position and a starting position, etc. These
strategy based requirements all involve manipulating information
which is currently available from the board given the existing
requirements set. As a result these types of requirements are not
really of the board itself, but represent the types of
manipulations of board objects which may occur. As such, these will
be addressed as requirements of functions that are currently not
defined.</p>
<p>There are other requirements of the board that will be addressed
when other game structures are being developed. For the purposes of
getting started, these requirements will be ignored.</p>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e94" id="d0e94"></a>Hex-Board
Interaction</h2>
</div>
<p>Since we are looking to design objects, it is important to
consider interaction between objects. This section examines the
interactions that can be anticipated at the current time between
the board and a hex.</p>
<p>A hex needs to know its relative position on the board. In a
sense this is similar to a chess piece needing to know on which
square it is currently positioned. In a standard board (such as
those used for chess and checkers), the board grid is generally
represented as a two dimensional matrix. Thus, board positions can
be identified by a tuple which indicates the location of a piece as
an offset from the axis. In chess, one axis is usually labeled with
letters (&quot;a&quot; to &quot;h&quot;) and the second axis with numbers (&quot;1&quot; to &quot;8&quot;).
In this nomenclature a piece can move from square &quot;a4&quot; to square
&quot;a5.&quot; The Swamp game board needs to have a similar system for
identifying the position of a hex within the board.</p>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e101" id="d0e101"></a>Requirement
Hex/Board-1:</h3>
</div>
<p>A grid based nomenclature needs to allow unique identification
of a hex position on the board.</p>
<p>The starting positions for players are defined as being three
adjacent hexes on the edge of the board. Thus, it is important for
a hex to know when it is on the edge of the board and which
portions of the hex constitute the edge of the board. For two
player games, the starting points must be opposite each other on
the board, and for three player games, there must be an appropriate
spacing between player starting positions so that all are evenly
spaced around the board. This knowledge of opposite ends of the
board and space between hexes needs to be captured in the hex and
board objects.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e108" id="d0e108"></a>Requirement
Hex/Board-2:</h3>
</div>
<p>It must be possible for the board to determine which hexes are
diametrically opposed on the board.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e113" id="d0e113"></a>Requirement
Hex/Board-3:</h3>
</div>
<p>Edge hexes must be able to determine how many intervening edge
hexes separate them on the board.</p>
<p class="c2"><span class="remark">Editorial Notes</span></p>
<p class="c2"><span class="remark">I have published the above even
though it is but a fragment of what Brett had planned for this
issue. There is a serious reason for this so please do read these
notes to the end.</span></p>
<p class="c2"><span class="remark">In case any of you are
wondering, it has nothing to do with the deadly silence on the
mailing list we set up for this project so the guilty among you can
relax. However, get yourselves on that list and start doing some
work. I remind you that if we manage to bring this project to
completion Brett was planning some way in which the end result
could raise money for a charity nominated by our Disabilities
Officer (Silas Brown, another member who gives unstintingly of his
time and expertise)</span></p>
<p class="c2"><span class="remark">One of the things that I always
tried to promote when I was ACCU Chair was a sense of family among
members. I care about people as individuals. I know that this
feeling is shared by many members.</span></p>
<p class="c2"><span class="remark">Enough pre-amble. Brett recently
became the proud father of a son to add to his family of three
adopted teenagers. Any of us who are parents know just how much
extra stress such a welcome event adds to our lives; lost sleep
being the least of our worries. In Brett's case this has been
compounded by his infant son needing to return to hospital several
times.</span></p>
<p class="c2"><span class="remark">I feel confident that readers of
C Vu will wish Brett's son and his loving parents a speedy return
to peaceful and healthy existence. In the meantime, you can burn
some oil with some coding practice. It would be nice to see some
sample code being discussed and refined on the mailing list. Now
what was the address of that list?</span></p>
</div>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
