1. text file loading

This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C230F9.118F7740
	charset="iso-8859-1"

Ok, a while back i was working on a checkers program that plays through =
games, anyways the moves are loaded from a text file by Source =
Destination so one move would be: 11 15
is there any way possible to add another part to define a number (or =
numbers) that was 'jumped' over. like maybe have the text file something =
like:  25 18 [22] (22 being the piece that was jumped..) it would need =
to be able to hold multiple numbers for jumps capturing 2 or more =
pieces... any ideas?

------=_NextPart_000_0007_01C230F9.118F7740
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Ok, a while back i was working on a =
checkers=20
program that plays through games, anyways the moves are loaded from a =
text file=20
by Source Destination so one move would be: 11 15<BR>is there any way =
possible=20
to add another part to define a number (or numbers)&nbsp;that was =
'jumped' over.=20
like maybe have the text file something like:&nbsp; 25 18 [22] (22 being =
the=20
piece that was jumped..) it would need to be able to hold multiple =
numbers for=20
jumps capturing 2 or more pieces... any =

------=_NextPart_000_0007_01C230F9.118F7740--

new topic     » topic index » view message » categorize

2. Re: text file loading

On 21 Jul 2002, at 20:56, weddle at psknet.com wrote:

> 
> Ok, a while back i was working on a checkers program that plays through games,
> anyways the moves are loaded from a text file by Source Destination so one
> move
> would be: 11 15 is there any way possible to add another part to define a
> number
> (or numbers) that was 'jumped' over. like maybe have the text file something
> like:  25 18 [22] (22 being the piece that was jumped..) it would need to be
> able to hold multiple numbers for jumps capturing 2 or more pieces... any
> ideas?

Xml?
line = <source=x,y><jmp1=a,b><jmp2=c,d><jmp3=r,g><dest=z,w>

Kat

new topic     » goto parent     » topic index » view message » categorize

3. Re: text file loading

On Sun, 21 Jul 2002 20:39:33 -0700, weddle at psknet.com wrote:

>Ok, a while back i was working on a checkers program that plays through
>games, anyways the moves are loaded from a text file by Source Destination
>so one move would be: 11 15

>is there any way possible to add another part to define a number (or
>numbers) that was 'jumped' over. like maybe have the text file something
>like:  25 18 [22] (22 being the piece that was jumped..) it would need to
>be able to hold multiple numbers for jumps capturing 2 or more pieces...
>any ideas?

You shouldn't need to.  Because of the rules of checkers, if the source and
destination squares aren't adjacent, it must have been a jump, so the
intervening space can be calculated.  For a multiple jump, I would simply
record each jump as though it was a separate move, with the opponent not
moving between them.

--
Jeff Zeitlin
jzeitlin at cyburban.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu