[LRUG] Battleship: Ruby Fight Club

David Salgado david at digitalronin.com
Tue Sep 13 06:14:11 PDT 2011


Paul already knows this, because I suggested it, but my rationale for
disagreeing with James is that having the 4th state means you can
write a stateless player.

To clarify, if you don't know whether a cell with a hit in it is a
part of a ship you've already sunk, then you don't know if it's worth
firing more shots nearby.

For me, tracking the board state is not an interesting part of the
problem - I know I can do it, but I'd much rather the framework did it
for me because that means I can focus on the interesting (to me) parts
of the problem - i.e. search and placement strategies.

Just my 2c

D

On 13 September 2011 14:10, James Adam <james at lazyatom.com> wrote:
> I say don't bother; it's something the players can track for themselves should they wish.
>
> On 13 Sep 2011, at 14:08, Paul Battley wrote:
>
>> It has been suggested to me that the state as passed to take_turn
>> should, in addition to the current three states {unknown, miss, hit}
>> have a fourth state of sunk that would apply to any cell of a ship
>> that has been sunk.
>>
>> What do you think?
>>
>> Paul.
>> _______________________________________________
>> Chat mailing list
>> Chat at lists.lrug.org
>> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>



More information about the Chat mailing list