Bug 49173 - Wrong counting when ball leaves field
Summary: Wrong counting when ball leaves field
Status: RESOLVED FIXED
Alias: None
Product: kolf
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Jason Katz-Brown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-15 11:33 UTC by Christian Na
Modified: 2003-06-23 07:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Na 2002-10-15 11:33:29 UTC
Version:           1.1 (using KDE 3.0.8 (KDE 3.1 beta2))
Installed from:    compiled sources
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease)
OS:          Linux (i686) release 2.4.19

I played Kolf in several courses with 2 players and noticed the following:

When my ball leaves the field (e.g. no walls stop it), the other player
gets a point, but my score doesn't get the point.

I thing the scoring should be: My ball leaves the field -> I get a point.
The other player not...
Comment 1 Albert Astals Cid 2003-04-29 21:37:56 UTC
I have a patch that sorts this (well it works for me (TM)) 
 
Index: game.cpp 
=================================================================== 
RCS file: /home/kde/kdegames/kolf/game.cpp,v 
retrieving revision 1.163 
diff -u -r1.163 game.cpp 
--- game.cpp    11 Feb 2003 21:51:04 -0000      1.163 
+++ game.cpp    25 Apr 2003 20:48:26 -0000 
@@ -2790,15 +2790,13 @@ 
                        // don't do it if he's past maxStrokes 
                        if ((*it).score(curHole) < holeInfo.maxStrokes() - 1  
|| !holeInfo.hasMaxStrokes()) 
                        { 
-                               shotDone(); 
                                loadStateList(); 
 
                                // increment curPlayer; he did take a shot,  
after all 
                                (*curPlayer).addStrokeToHole(curHole); 
                                emit scoreChanged((*curPlayer).id(), curHole,  
(*curPlayer).score(curHole)); 
                        } 
-                       else 
-                               shotDone(); 
+                       shotDone(); 
 
                        return; 
                } 
Comment 2 Jason Katz-Brown 2003-06-23 07:42:19 UTC
hi! 
 
 sorry to take so long to get around to thsi.. 
 
fixed in 3.1 branch, will fix in head after i return from japan in 2 weeks. 
 
 
thanks so much!