From anthony@dino.omen.com.au  Sat Oct  3 08:12:27 1998
Received: from mail.tower.net.au (orion.tower.net.au [203.22.233.3])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA16862
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 3 Oct 1998 08:12:21 -0700 (PDT)
          (envelope-from anthony@dino.omen.com.au)
Received: from s2-15.staronline.com.au ([203.18.142.215]) by mail.tower.net.au
	 with esmtp id m0zPTLj-000SgJC
	(Smail-3.2.0.92 1997-Feb-9 #2); Sat, 3 Oct 1998 23:11:59 +0800 (WST)
Message-Id: <199810032313.XAA01271@magenta.tower.net.au>
Date: Sat, 3 Oct 1998 23:13:48 GMT
From: lemonpie@tower.net.au
Reply-To: lemonpie@tower.net.au
To: anthony@indigo.tower.net.au
Subject: Bug in Battleship (Salvo Mode)
X-Send-Pr-Version: 3.2

>Number:         8134
>Category:       bin
>Synopsis:       End of game is not recognised immediately in salvo mode.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct  3 08:20:01 PDT 1998
>Closed-Date:    Sat May 20 22:50:29 PDT 2000
>Last-Modified:  Sat May 20 22:57:18 PDT 2000
>Originator:     Anthony Di Pietro
>Release:        FreeBSD 3.0-BETA i386
>Organization:
>Environment:

	FreeBSD-current running on a Pentium 200MMX with 32M RAM.

>Description:

	When playing battleship (/usr/games/bs) in salvo mode (ie using
	the -s option), if you destroy all of the computer's ships, but
	still have one or more shots remaining in your salvo, the game
	does not recognize your victory until you finish your salvo.

>How-To-Repeat:

	Play in salvo mode and beat the computer mid-salvo.  When I did it,
	I was firing two shots at a time (2 ships left) and the computer
	was firing one shot at a time (1 ship left).  I destroyed his
	last ship with my first shot, and the game didn't end until
	I fired my other shot.

>Fix:
	
	I haven't looked at the source, but I suppose you aren't checking
	whether the game has ended after every shot, but rather at the
	end of every turn.  If you check after every shot, things should
	work properly, I guess.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: hoek 
State-Changed-When: Sat May 20 22:50:29 PDT 2000 
State-Changed-Why:  
Re: 
Play in salvo mode and beat the computer mid-salvo.  When I did it, 
I was firing two shots at a time (2 ships left) and the computer 
was firing one shot at a time (1 ship left).  I destroyed his 
last ship with my first shot, and the game didn't end until 
I fired my other shot. 

Response: 

This is intentional.  When you have two ships left, you are firing two 
shots at a time.  In a real sea battle, you cannot call back a shot 
after you have committed to firing it.  You have to live with your 
actions for then and for ever more.  In the game of battleship, we are 
trying to mimick life at the high-seas as much as possible.  In real-life, 
you would not have the option of expecting your crewmembers to immediately 
cease fire just because the enemy is destroyed.  As commander of the ship, 
you will forever have on your conscience the needless waste of lives 
that were lost when those canons killed poor helpless whales and tuna-fish. 

Here, at FreeBSD Inc., we want you to understand that you must face the 
consequences of your actions.  Consider the game battleship merely as 
preparation for the real world. 

Also, expact to be hearing from markm@grondar.greanpeace.za very soon. 
I don't imagine that he will be in the least bit pleased with your 
actions. 

I'm sorry it had to be like this.  You made your own bed when you 
started killing poor helpless innocent (and most importantly!) photogenic 
whales and tuna-fish. 

Please enjoy the remainder of your stay with FreeBSD Inc.. 

Come again! 
>Unformatted:
