Bug 36582

Summary: freecell - can move from foundation but shouldn't be able to
Product: [Applications] kpat Reporter: Tim Wunder <twunder>
Component: generalAssignee: Stephan Kulow <coolo>
Status: RESOLVED FIXED    
Severity: normal CC: kanthoney
Priority: NOR    
Version: 2.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Don't allow removing cards from foundation
Don't be too aggresive moving cards to the foundation

Description Tim Wunder 2001-12-29 00:58:42 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kpat
Version:           2.0 (using KDE 2.2.1 )
Severity:          normal
Installed from:    compiled sources
Compiler:          gcc version 2.95.2 19991024 (release)
OS:                Linux (i686) release 2.4.9
OS/Compiler notes: 

When playing Freecell the player can take cards from the foundation and play them. This should not be allowed. Once the cards are placed on the foundation they cannot be removed.
Additionally not all cards capable of being played on the foundation should be automatically placed there. It seemed that this version of Freecell was too agressive with moving cards automatically to the foundation.

Additionally double-clicking a card should move it from the playing area to one of the four Freecells.

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Stephan Kulow 2002-09-21 23:15:05 UTC
*** Bug 46274 has been marked as a duplicate of this bug. ***
Comment 2 Michael Jarrett 2003-03-29 06:34:28 UTC
Confirmed still as described in today's HEAD. Cards should not be able to be removed 
from the foundations. The Windows Freecell implementation is too conservative in 
moving cards up to the foundations, but kpat is too aggressive. According to most 
sources I've read, a card can be moved to a foundation automatically if it is exposed 
and BOTH the foundations of the opposite color are at most two ranks lower than the 
card you are examining to move up. 
Comment 3 Josh Metzler 2003-06-05 21:07:38 UTC
Created attachment 1723 [details]
Don't allow removing cards from foundation

I created a patch that should disallow removing cards from the foundations. 
Looking through WebCVS, though, it looks like the line this removes was
explicitly added in frecell.cpp revision 1.23.	I don't know why that was done.
 Maybe some other freecell-type game allows it?
Comment 4 Josh Metzler 2003-06-05 23:10:29 UTC
Created attachment 1724 [details]
Don't be too aggresive moving cards to the foundation

This patch takes ideas from klondike for when not to automatically move cards
to the foundation.  Basically, if the lowest card of a different color is one
lower, or if it is two lower and the lowest card of the same color is only two
lower.	This patch is meant to be applied on top of the previous patch.  I can
create a version for the 3.1 branch, too, if you want.
Comment 5 Stephan Kulow 2003-10-14 12:47:10 UTC
Subject: kdegames/kpat

CVS commit by coolo: 

apply the patches supplied by Josh Metzler
CCMAIL: joshdeb@metzlers.org
CCMAIL: 36582-close@bugs.kde.org


  M +123 -2    freecell.cpp   1.52
  M +1 -0      freecell.h   1.21