owenb132 / solitaire-for-android

Automatically exported from code.google.com/p/solitaire-for-android
Apache License 2.0
0 stars 0 forks source link

Generic Anchor type for ease of game implementation #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add a GenericAnchor type to more easily implement new games (e.g. instead 
of the static SUIT_SEQ_STACK and SPIDER_STACK, be able to build anchors 
based on rules such as "build ASC in suits", "build DESC alternating 
colors").

Original issue reported on code.google.com by sirpe...@gmail.com on 27 Jan 2009 at 8:38

GoogleCodeExporter commented 9 years ago
Here is an implementation that showcases a proposed GenericAnchor - it replaces 
the 
stacks in the tableaus for Solitaire and Spider, and implements the new game 
Forty 
Thieves.
Use new object variables mBUILDSEQ, mMOVESEQ, mBUILDSUIT, mMOVESUIT, 
mBUILDWRAP, 
mMOVEWRAP, mDROPOFF, mPICKUP, mDISPLAY and their subsequent setters to define 
the 
behavior how cards are placed on stacks (BUILDxxx) and how cards can be moved 
from 
them (MOVExxx).

Original comment by sirpe...@gmail.com on 27 Jan 2009 at 8:43

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry for the huge delay but I finally integrated this patch. If you get a 
chance in
the next day or so give the build a try and make sure everything works the way 
it
should (I'm not very familiar with this game type.) It was committed in 
revision 25.

Original comment by kma...@google.com on 26 May 2009 at 10:58

GoogleCodeExporter commented 9 years ago
Sorry for  the delay with testing. It took a while to figure out the new SDK,  
and after installing it took a 
long time to make sure everything works (the game, by design, has a really low 
winnable-ratio).
The only issue is  with multi-card pickup. Just like with freecell, if x is # 
of open spaces the multipick 
should allow x+1 cards, but refuse to drop on an empty column (unless there are 
x or less cards).

If the fix is simple I'll leave it to you. Otherwise let me know and I'll work 
up a fix.

Original comment by sirpe...@gmail.com on 19 Jun 2009 at 4:50