Re: text file loading
- Posted by jzeitlin at cyburban.com Jul 22, 2002
- 367 views
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