The game is nearing completion! I've added FreeCell, and I've added game saving. Now you can stop the game you're playing, and resume it at a later time. There are now two pending features: undo/redo, and adding some better graphics. I think I can do both in the remaining 2.3 K of space, and I can increase that to 2.8 K if needed by moving the IVT and ISR into RAM.
You can download Solitaire and its source code from the
Cemetech archives.
Here are some new screen shots:
Main menu 1:
Main menu 2:
Klondike Solitaire:
FreeCell:
Game saving in action:
Full readme:
Code:
Solitaire
March 27 2014
====== Introduction ============================================================
Since Windows 3.0, Windows has included two electronic versions of two
Solitaire (or Patience in UK English) type card games. Windows called them
Solitaire and FreeCell. This app currently implements a clone of both programs.
For the precise rules of Klondike and FreeCell, please consult the Internet.
====== Usage ===================================================================
MAIN MENU
Solitaire has a main menu which lets you select which game to play, and the
options applicable for the chosen game. The currently selected menu item is
displayed in inverted color; that is, white text on black background. The arrow
keys will select different items. Press ENTER or 2ND to select an item.
To quit, you must press the quit button at the bottom of the screen.
Unlike in the OS, Solitaire will not dim the screen after a period of no
activity. However, after three minutes, Solitaire will terminate itself and
turn the calculator off. If this happens while a game is in progress, Solitaire
will save your game if there is sufficient free RAM (about 400 bytes).
SAVING
Solitaire uses an appvar named Solitair to save your settings and
statistics. This appvar is about 100 bytes in size at a minimum, and is always
in RAM. If you archive the appvar, Solitaire will unarchive it, and will not
rearchive it.
Additionally, while you are playing a game, Solitaire can save your game and
restore it when you rerun the app. This function can be invoked explicitly by
pressing MODE. This will expand the save appvar to about 400 bytes. If you are
playing a game, and press no buttons for more than three minutes, Solitaire will
attempt to save your game, and then turn the calculator off.
There are some conditions that can prevent Solitaire's save feature from
working:
- An appvar named Solitair was created by another application. Solitaire
cannot use any other appvar name.
- There is not enough free RAM. If there is enough free RAM for the appvar to
save statistics, then they will be updated when you quit; however attempting
to use the save feature (either by pressing MODE or waiting three minutes)
will cause the app to update its statistics, but not save your game.
- There is not enough RAM to unarchive the appvar when it is archived. This
is exactly like above, but statistics won't be saved, either, and any saved
game cannot be resumed.
- The appvar was created by an older version of Solitaire, and the new version
cannot understand it.
In any of these circumstances, attempting to invoke the game saving feature---
either through pressing MODE or waiting three minutes---WILL NOT SAVE YOUR IN-
PROGRESS GAME.
If you repeatedly get error messages when starting Solitaire and you are
sure there are not, in fact, any problems, try deleting the appvar Solitair.
GENERAL GAME PLAY
Once you have started a game, use the arrow keys to move the cursor around.
Use ENTER or 2ND to select a card, move the cursor to another card, and then use
ENTER or 2ND again to place the card. Cards that are hidden may be revealed
with ENTER or 2ND.
If you do not a press any keys for three minutes, Solitaire will attempt to
save the in-progress game and then turn off the calculator, returning you to the
home screen; see above for more information.
BUG CHEKCS
Solitaire contains sanity checks in certain areas, in which the game
verifies that its internal data is in a valid state. If a sanity check fails,
it means that the app has a bug. Therefore, the game will display an error
message saying BUG CHECK, followed by some numbers. A BUG CHECK can also be
triggered by press ON at any time, which may be useful if the game appears to
have locked up. If you see a BUG CHECK and you did not cause it purposefully,
please record the numbers, and send them to me, with a thorough description of
what you were doing when the BUG CHECK was triggered. If at all possible, also
send an exact list of steps that cause the issue; you may also need to include
the appvar Solitair.
------ Klondike ----------------------------------------------------------------
Klondike is the name for the specific version of Solitaire Windows is known
for.
Unlike in Windows Solitaire, the four foundations that you must move cards
into is not on the top right. Instead, they are on the left side of the screen;
this is purely due to the low resolution of the TI-84 Plus C SE screen.
Y= will draw more cards from the deck. Alternatively, you may simply click
on the deck. Click on a hidden card to flip it.
There are two main scoring modes: normal and Vegas. In normal mode, the
score is always positive. 500 points is average for an un-timed game, 700-plus
is excellent.
Vegas scoring has two sub-modes: non-cumulative and cumulative. In Vegas
scoring, you only get one pass through the deck. When you start the game, you
start 52 currency units (e.g. US dollars) in debt, and earn back 5 units for
every card moved to a home cell (or foundation). With only pass through the
deck, your chances of winning are very small. In fact, even earning back more
than 52 units is very hard. In cumulative mode, you get to retain any debt (or
credit, however unlikely that may be) from previous hands. Switching back to
normal scoring will erase your debt. (Caution: May not work in real casions.)
Basically, in Vegas mode, you're almost certain to lose. That's why it's
called Vegas mode.
If you enable the timer, in normal scoring mode, you lose two points every
ten seconds. In Vegas mode, the timer serves no purpose.
------ FreeCell ----------------------------------------------------------------
FreeCell is a game similar to Klondike Solitaire. However, an important
difference is that all cards are visible when you start the game. Also, you get
four free cells that can be used as a temporary holding area for exactly one
card. Therefore, unlike Klondike, FreeCell is purely a logic/strategy game.
Unlike in Windows FreeCell, the four home cells and free cells are not on
the top of the screen. Instead, they are on the left side of the screen; this
is purely due to the low resolution of the TI-84 Plus C SE screen.
This implementation of FreeCell provides the same 32000 unique games that
the original Windows FreeCell contained, the so-call Microsoft 32000. Every
game except one is solvable with normal four free cells; the unsolvable game is
#11982, which can be solved with a fifth free cell. Dozens of people have
claimed to have solved all 32000; if you attempt to solve all of them before
graduating, you are unlikely to graduate. Numbers 1941 and 10692 are also
considered very hard, and 617 often trips up beginners, or so I'm told.
You can find solutions to all 31999 games online in various places; be
forewarned, however, that this implementation does not currently support the
supermove.
====== About ===================================================================
------ Credits -----------------------------------------------------------------
FloppusMaximus and BrandonW are responsible for nearly all of the OS
documentation that made this possible. KermM provided the vital insight of the
identity of the specific LCD driver the TI-84 Plus C SE uses, without which this
game could not operate at a reasonable speed.
Xeda helpfully provided some optimizations for some routines.
------ Change Log --------------------------------------------------------------
Build 461 (27 March 2014)
- Added Random! button to GUI
- Fixed glitch in Klondike where disabling the timer would also make the Draw
text disappear
- Added some basic statistics
- Optimized some code
- Added win detection logic
- Added dialogs
- Added FreeCell game mode
- Fixed a bug in Klondike where moving a card onto a foundation would leave the
card below the new top card still selected, so you could move the card onto
another pile
- Fixed points being deducted at the wrong time when turning over the waste
- Fixed points being deducted after waste is empty
- Added settings, stats, and game saving. Now APDs correctly save your gave (if
possible)!
- Made FreeCell number entry and free cell count entry a little better
- Changed a bunch of code relating to the card cursor positioning that I had been
putting off until I implemented FreeCell
Build 259 (19 March 2014)
- ALPHA now implements move-to-home-cell
- If you empty the waste, it shows the card beneath if one is there
- Deck graphic changes to empty box if no more cards are in deck
- Down key moves to bottom-most card in stack
- Changed how the arrow keys move between stacks
- All illegal moves should now also unselect the currently selected card
- So ALPHA will unselect the currently selected card
- HOPEFULLY fixed rare random freeze issue
- Implemented timer
- Implemented scoring
- APD now three minutes
- Every invocation of the build.bat file will now increment the build number,
so every version has a unique ID.
Initial release (12 March 2014)
- Basic functionality