Voilà un petit programme, certainement déjà présent ici, à savoir un casse-briques.
Pour jouer: lancer CASBRIQ, choisir "New Game", puis diriger la barre de réception à l'aide des flèches. Pour lancer la balle, appuyer sur Entrée. Pour quitter la partie, appuyer sur "Suppr".
Pour créer/éditer des niveaux: lancer CASBEDIT. appuer sur Entrée (lire le message d'aide en anglais, éventuellement), éditer le niveau (touche "+" pour insérer une brique, touche "-" pour la retirer, flèches directionnelles pour bouger.
Une fois l'édition terminée, appuyer sur "mode", le programme va analyser votre niveau et produire une liste (L1).
Ensuite, il faut ouvrir le programme CASBLVL, se positionner à la fin, insérer les lignes suivantes:
| Code | If D=[niveau]:Then
[liste]->L1
End
|
Pour insérer [liste], faites 2nde+sto (rappel), puis 2nde+1 (L1), puis Entrée.
Votre niveau sera inséré, et jouable (sous réserve de réussir les précédents!)
Les programmes;
Licence:
| Citer |
prgmCASBRIQ, prgmCASBEDIT, prgmCASBLVL - "Casse-brique" game (c) 2011 Corentin FERRY
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. |
Programme CASBRIQ:
| Code | EffEcr
Disp "----CASBRIQ-----
Disp "--BY COCODIDOU--
For([theta],1,800
End
Output(8,1,"-PRESS ENTER...-
Pause
Lbl M
Menu("CASBRIQ","NEW GAME",N,"QUIT",Q
Lbl N
EffEcr
EffVar G
{12,8}->dim([A]
Remplir(0,[A]
1->D
prgmCASBLVL
For([theta],1,dim(L1),2
Output(L1([theta]+1),L1([theta]),"*
1->[A](L1([theta]),L1([theta]+1
G+1->G
End
6->C
C->X
7->Y
(-)1->U
EffVar J
entAléat((-)1,1)->T
3->L
Output(8,C,"--
Output(7,13,"LIVE
Output(8,13,L
Output(4,13,"LVL.
Output(5,13,D
While L
While G et L
codeTouche->K
If K=23:Goto M
If K=24 et C>1:Then
If C<11:Then
Output(8,C+1,"
Else
Output(8,C,"
End
C-1->C
Output(8,C,"--
If non(J:Then
Output(Y,X,"
X-1->X
End
End
If K=26 et C<11:Then
If C>1:Then
Output(8,C-1,"
Else
Output(8,C,"
End
C+1->C
Output(8,C,"--
If non(J:Then
Output(Y,X,"
X+1->X
End
End
If non(J:Then
Output(1,13,"PRS.
Output(2,13,"ENTR
End
If J et (X=1 ou X=12) et non([A](X,Y)):(-)T->T
If J et (Y=1 ou (Y=7 et (X=C ou X=C+1))) et non([A](X,Y)):(-)U->U
If [A](X,Y:Then
If non(T:Then
entAléat(0,1->T
If non(T:(-)1->T
Else
(-)T->T
End
(-)U->U
0->[A](X,Y
G-1->G
End
If Y=8:Then
Output(Y,X,"
C->X
7->Y
(-)1->U
entAléat((-)1,1->T
L-1->L
Output(8,13,L
EffVar J
End
If K=105:Then
1->J
Output(1,13,"
Output(2,13,"
End
If J:Then
Output(Y,X,"
X+T->X
Y+U->Y
If non(X) ou X=13:Then
1->X
(-)T->T
End
If non(Y):Then
1->Y
(-)U->U
End
End
Output(Y,X,"[petit carré]
End
If L:Then
Output(5,1,"WIN EXTRA LIFE!
Output(4,1,"LEVEL COMPLETE!
For([theta],1,1200
End
D+1->D
6->C
C->X
L+1->L
EffVar G
EffVar [A]
{12,8}->dim([A]
prgmCASBLVL
EffEcr
Output(8,C,"--
For([theta],1,dim(L1),2
Output(L1([theta]+1),L1([theta]),"*
1->[A](L1([theta]),L1([theta]+1))
G+1->G
End
Output(4,13,"LVL.
Output(5,13,D
Output(7,13,"LIVE
Output(8,13,L
EffVar J
End
End
Output(4,1,"--GAME OVER-
For([theta],1,800
End
EffEcr
Goto M
Lbl Q
EffVar L1
EffVar [A]
EffEcr |
Programme CASBEDIT:
| Code | EffEcr
Disp "-CASBRIQ EDITOR-
Disp "--BY COCODIDOU--
For([theta],1,800
End
Output(8,1,"-PRESS ENTER...-
Pause
EffEcr
Disp "EDIT YOUR MAP W/
Disp "THE ARROW AND +/
Disp "- KEYS THEN PRES
Disp "S MODE.
Disp "-PRESS ENTER...-
Pause
EffEcr
EffVar C
1->X
1->Y
Output(Y,X,"Ð
{12,8}->dim([A]
Remplir(0,[A]
For([theta],1,12
Output(8,[theta],"-
End
For([theta],1,7
Output([theta],13,"]
End
While 1
codeTouche->C
If C=22:Goto E
If (C=24 and X>1) ou (C=26 and X<12) ou (C=25 and Y>1) ou (C=34 and Y<7):Then
If [A](X,Y:Then
Output(Y,X,"*
Else
Output(Y,X,"
End
If C=24:X-1->X
If C=26:X+1->X
If C=25:Y-1->Y
If C=34:Y+1->Y
Output(Y,X,"Ð
End
If C=95:1->[A](X,Y
If C=85:0->[A](X,Y
End
Lbl E
EffEcr
EffVar L1
0->G
For(X,1,12
For(Y,1,8
If [A](X,Y:Then
G+1->G
X->L1(G
G+1->G
Y->L1(G
End
End
End
Disp "RESULT IN L1 |
Programme CASBLVL (extensible à votre discrétion):
| Code | If D=1:Then
{3,2,3,3,3,4,3,5,3,6,4,6,5,6,6,6,7,6,8,6,9,6,10,2,10,3,10,4,10,5,10,6}->L1
End
If D=2:Then
{2,1,2,2,2,3,2,4,2,5,3,1,3,3,3,5,4,1,4,3,4,5,5,1,5,5,8,1,8,2,8,3,8,4,8,5,9,
1,9,3,10,1,10,3,11,1,11,2,11,3,11,4,11,5}->L1
End
If D=3:Then
{1,1,2,3,2,4,2,5,2,6,3,2,3,6,4,1,4,3,4,6,5,1,5,4,5,5,5,6,6,1,6,3,6,4,
6,5,6,6,7,1,7,3,7,4,7,5,7,6,8,1,8,4,8,5,8,6,9,1,9,3,9,6,10,2,10,6,11,
3,11,4,11,5,11,6,12,1}->L1
End |
Le tout est téléchargeable, pour ceux possédant le câble:
http://corentin.ferry.free.fr/casbriq_gameonly.83g - Jeu seul (pas d'éditeur de niveaux)
http://corentin.ferry.free.fr/casbriq_game_edit.83g - Jeu + éditeur de niveaux
Voilà, amusez-vous bien
Cocodidou
|