[SRC] Slider Puzzle 2.2[Archive Ti-Fr v2]
Taille du fichier : 11.872 Ko
Nombre de téléchargements : 583
Nombre de vues : 6261
Description rapide : Vous connaissez tous ce jeu ou il faut reconstituer une image en glissant des cases.
Auteur de l'archive :
Calculatrices concernées : TI-92+
Hardware concernés : Indifférent
ROMs (AMS) supportés : Tous (ou non renseigné)
Langage de programmation utilisé : C
Description Complète : 1.0 Basic Information

Slider Puzzle is one of those simple puzzles with movable numbered pieces. Your job
is to arrange the pieces in order.

This program was created as a review of the TIGCC programming lessons on Techno-Plaza,, specifically, lessons 1, 2, and 3.

The second version of this program was modified from the first version to be a review
for the fourth, fifth, and sixth lessons. The program has been dramatically altered,
source code wise, but the program plays almost identical to the first version, with
the exception that the game loops until you choose to exit with the ESC key.

This program should work on any TI-89/92+, with any AMS version. It does not require
a kernel, shell, or any libraries. It does not require any special AMS patching to
overcome any of TI's AMS limitations.

The source code is included, and is freely redistributable under the terms of the GNU
General Public Licencse (GNU GPL), included as license.txt in this archive.

1.1 Revision History

Version 2.2 * June 2, 2001
- Fixed bug where it would draw bad starting positions if the first puzzle
piece was the missing piece.
Version 2.1 * June 1, 2001
- Fixed the loop to only ask you to play again after the first game is over.
- Made minor source code adjustments for efficiency.
Version 2.0 * March 10, 2001
- Revamped source code to be more effective teaching tool.
- Added a loop to let you play over and over again. (Or to change games)
- Added documentation note that some puzzles may be unsolvable.
Version 1.0 * December 23, 2000
- Initial Program Release.
- Created as a tool to teach programming concepts.
- Simple puzzle piece numbers are generated from Windows fonts.

2.0 Source Code Information

The source code is freely redistributable under the terms of the GNU GPL, included as

This program was designed as a review of TIGCC programming, as documented in TIGCC
Programming Lessons 4, 5, and 6. These lessons are available at my website,, if you would like to learn C programming. At the time of
the first version, there we no slider puzzle games available for the TI-89/92+, so
that version was released to the public via the major TI calculator sites (, Since this version has an acute design flaw in its mathematics (see the
note in section 3.0 of this doc), it will not be released to the public by me. However,
since this program is licensed under the GNU GPL, you may feel free to redistribute it
as you see fit, within the constraints of the license of course. You may not redistribute
this program without this documentation, or without the source code.

Slider Puzzle 2.0 was written using TIGCC 0.91 and the TIGCC IDE by Sebastian Reichelt.
Thanks to Zeljko Juric for his great TIGCC library and documentation, Xavier Vassor for
the wonderful link program that makes C programming possible, and Jean Canazzi and the
rest of the TIGCC team for the wonderful TIGCC programming environment, which makes C
programming a reality for TI-89/92+ platforms.

If you wish to learn more about programming in TIGCC, consult Techno-Plaza's programming
lessons at the website,

3.0 Gameplay Information

As it is, the game is pretty simple, and the keys are printed on the screen, but here
is how the game works.

A 16-piece puzzle is drawn, with the pieces being randomized, and one of the slots being
empty, so you can move one piece at a time. The current piece will flash off and on
every 1/2 second (using the USER timer based on interrupt 5), so you know which one it

You can use the arrow keys to move to different pieces (the empty slot will be skipped
over automatically). Then, when you have a piece you wish to move, simply press the
ENTER key. If there is an empty slot immediately adjacent to the current piece, the
piece will be moved into this slot. If there is no immediately adjacent square adjacent,
the piece will not be altered. This game is not sophisticated, and hence does not
support moving an entire row, or two or more pieces at a time. You can only move one
piece at a time, and only if the empty slot is one square up, down, left, or right
from the piece you are trying to move. All other attempts to move a piece will fail.

To quit the game, press ESC. The game does not save its state, so it will reset the
game every time it is started. I may change this in a future version, but this was only
designed to be a simple programming review of a few basic C concepts. I didn't really
intend to release it until I found out there were no other programs like this in

NOTE: I have been made aware of a major flaw in the program design. The puzzle is not
always solvable. Since the pieces are arranged randomly, there is a mathematical
certainty that some combinations are impossible to solve. This means that you may not
be able to solve the puzzle, no matter how hard you try. This program was created to
review the concepts in the programming lessons written for Techno-Plaza, not to be a
game. The game part is more a side effect of wanting to have something not completely
trivial to teach programming concepts. This does not mean that all the puzzles are
unsolvable. I have solved some of the puzzles that it has generated, but after
receiving this information, I tried the program again and spent two hours without
coming to any successful solution. If you are looking for a real slider puzzle game,
I believe the TI Chess Team created one that uses grayscale and pictures, and their
version is probably far superior to this one, since it was designed to be a game.
Their web site is available at

4.0 Contact Information

My name is John David Ratliff. You can contact me via email at,
or through my website at using my feedback form:

My website has programming lessons for learning to program in C using TIGCC, if you are
interested in such things.

Have fun with my little program.
Archive mise en ligne par : Flanker
Date de mise en ligne : 8/06/2004 à 19:41:34

- Ti FR v3 - Ce site n'est pas le site officiel de texas instruments. En cas de problèmes techniques sur le site veuillez contacter l'administrateur. Merci de vos visites !
page générée en 176 ms