Pikku pelit

Jaa meneillään olevat projektisi tai valmiit pelit muun yhteisön kanssa täällä.
User avatar
kaneli2000
Guru
Posts: 1059
Joined: Mon Mar 17, 2008 2:40 pm
Location: Lempäälä

Re: Pikku pelit

Post by kaneli2000 »

LittleGreen wrote:@DatsuniG: Ihan kiva pikku onkelmapeli, ratkaisin alle minuutissa.
Sama. Mutta idea hyvä, vaikka olikin lyhyt.
I see the rainbow rising
Viltzu
Guru
Posts: 1132
Joined: Sun Aug 26, 2007 5:45 pm
Location: Alavieska
Contact:

Re: Pikku pelit

Post by Viltzu »

kaneli2000 wrote:
LittleGreen wrote:@DatsuniG: Ihan kiva pikku onkelmapeli, ratkaisin alle minuutissa.
Sama. Mutta idea hyvä, vaikka olikin lyhyt.
Kyllä, sain alle 20 sekunnin. Kun ensin olin opetellut miten se kuuluu tehdä. <-Tuossa ongelma. Tuon voi ratkaista vain kerran "oikeasti".
Mutta muuten ihan jännä, keksitkö idean itse?
DatsuniG
Advanced Member
Posts: 367
Joined: Fri Aug 15, 2008 9:57 pm

Re: Pikku pelit

Post by DatsuniG »

Tuo on melko vanha ongelmanratkaisutehtävä, eli en keksinyt itse. : )
Hengität nyt manuaalisesti.
User avatar
valscion
Moderator
Moderator
Posts: 1599
Joined: Thu Dec 06, 2007 7:46 pm
Location: Espoo
Contact:

Re: Pikku pelit

Post by valscion »

DatsuniG wrote:Tuo on melko vanha ongelmanratkaisutehtävä, eli en keksinyt itse. : )
Heh, muistan kun joskus wanhassa Win95:ssa oli samanlainen peli, tosin siinä oli mustia ja valkosia nappuloita ja niitä oli viisi molemmilla puolilla. Sen ajan hienoimpia pelejä :D
cbEnchanted, uudelleenkirjoitettu runtime. Uusin versio: 0.4.1 — Nyt myös sorsat GitHubissa!
NetMatch - se kunnon nettimättö-deathmatch! Avoimella lähdekoodilla varustettu
vesalaakso.com
User avatar
ukkeli
Active Member
Posts: 123
Joined: Thu Jan 28, 2010 9:01 pm

Re: Pikku pelit

Post by ukkeli »

tässä mun varo vihollista ja osu tulipalloihin tämä on kyllä aika huono mutta
kommentoikaa!

Code: Select all

Type score
Field obj
End Type

FrameLimit 40

ukko=LoadObject("media\guy.bmp", 72)
vihu=LoadObject("media\guy.bmp", 72)
PositionObject vihu,120,0 
pis=LoadObject("media\fireball.bmp", 72)

Repeat 

If UpKey() Then MoveObject ukko,3
If DownKey() Then MoveObject ukko,-3
If LeftKey() Then TurnObject ukko,5
If RightKey() Then TurnObject ukko,-5

MoveObject vihu,2          
PointObject vihu,ukko

If ObjectsOverlap(ukko,vihu) Then 
MakeError "sait"+pisteet+"pistettä!"                  
End If

If Timer() Then  
pist.score = New(score)
pist\obj=CloneObject(pis)
PositionObject pist\obj,Rand(0,100),Rand(0,100)  
End If 

If ObjectsOverlap(ukko,pist\obj) Then
pisteet+1  
End If 

DrawScreen 

Forever 
...
DatsuniG
Advanced Member
Posts: 367
Joined: Fri Aug 15, 2008 9:57 pm

Re: Pikku pelit

Post by DatsuniG »

@ukkeli: Pisteitä saa vain kun osuu viimeiseksi luotuun "tulipalloon", ja uusi "tulipallo" luodaan jokaisen kierroksen aikana, on pisteiden haaliminen vaikeaa.
Siirrä

Code: Select all

If ObjectsOverlap(ukko,pist\obj) Then
pisteet+1 
End If
For...Next looppiin

sekä muuta

Code: Select all

If Timer() Then  
muotoon

Code: Select all

If Timer() - aika > Haluttu aika uuden tulipallon ilmestymiseen Then
aika = Timer()
...
Endif  
Hengität nyt manuaalisesti.
MrMonday
Advanced Member
Posts: 378
Joined: Fri Oct 10, 2008 2:35 pm

Re: Pikku pelit

Post by MrMonday »

ukkeli wrote:tässä mun varo vihollista ja osu tulipalloihin tämä on kyllä aika huono mutta
kommentoikaa!

Code: Select all

Koodia... 
no huh, johan oli.. ei mikään paras pelaamani cb-peli, mutta kyllä se siitä harjoittelun myötä lähtee rullaamaan ;)
ja kannattaa laittaa tulipallot ilmestymään ympäri kenttää, kun nyt ne jää kaikki yhteen sumppuun, eli korvaat seuraavan rivin..

Code: Select all

PositionObject pist\obj,Rand(0,100),Rand(0,100) 
..tällä:

Code: Select all

PositionObject pist\obj,Rand(-200,200),Rand(-150,150) 
ja "Kerätyt" tulipallot voisi poistaa, niin ei turhaah kenttä täyty niistä, ja että seuraava pallo ilmestyy vasta kun edellinen on kerätty..
User avatar
ukkeli
Active Member
Posts: 123
Joined: Thu Jan 28, 2010 9:01 pm

Re: Pikku pelit

Post by ukkeli »

tässä parempi versio siitä vihollisen
väistely pelistä ;)

Code: Select all

Type score
Field obj
End Type

FrameLimit 40

ukko=LoadObject("media\guy.bmp", 72)
vihu=LoadObject("media\guy.bmp", 72)
PositionObject vihu,120,0 
pis=LoadObject("media\fireball.bmp", 72)

Repeat 

If UpKey() Then MoveObject ukko,3
If DownKey() Then MoveObject ukko,-3
If LeftKey() Then TurnObject ukko,5
If RightKey() Then TurnObject ukko,-5

MoveObject vihu,2          
PointObject vihu,ukko

If ObjectsOverlap(ukko,vihu) Then 
MakeError "sait"+pisteet+"pistettä!"                  
End If

If Timer() - aika> 3000
aika=Timer()
pist.score = New(score)
pist\obj=CloneObject(pis)
PositionObject pist\obj,Rand(0,100),Rand(0,100)  
End If 

For pist.score = Each score
If ObjectsOverlap(ukko,pist\obj) Then
pisteet+1  
End If 
Next pist

DrawScreen 

Forever 
kommentoikaa edelleen
...
MrMonday
Advanced Member
Posts: 378
Joined: Fri Oct 10, 2008 2:35 pm

Re: Pikku pelit

Post by MrMonday »

Kannattaa ainakin siihen MakeError "sait"+pisteet+"pistettä!" laittaa välit, ettei tule tällaista: Sait47Pistettä!
eli: MakeError "sait "+pisteet+" pistettä!"
ja suuremmalla ruudulla voisi olla myös helpompi pelata..
pienillä muutoksilla kasvatat pelin näyttävyyttä huomattavasti ;)
User avatar
ukkeli
Active Member
Posts: 123
Joined: Thu Jan 28, 2010 9:01 pm

Re: Pikku pelit

Post by ukkeli »

no tässä on sitten viimeinen versio ;)
tässä on lisätty vihollisia tulee lisää
ja peli ois tässä
edit:lisäsin pisteet

Code: Select all

SCREEN 1200,1200,cbfullscreen

Type score
Field obj
End Type

Type score2
Field obj
End Type

Type vihut
Field obj
End Type


FrameLimit 40

ClsColor 128,168,4

ukko=LoadObject("media\guy.bmp", 72)
vihu=LoadObject("media\guy.bmp", 72)
PositionObject vihu,120,0 
pis=LoadObject("media\fireball.bmp", 72)
ShowObject pis,OFF 
pis2=LoadObject("media\cow.bmp", 72)
ShowObject pis2,OFF 


Repeat 

text 20,20,"pisteet"+pisteet

If UpKey() Then MoveObject ukko,3
If DownKey() Then MoveObject ukko,-3
If LeftKey() Then TurnObject ukko,5
If RightKey() Then TurnObject ukko,-5

MoveObject vihu,2          
PointObject vihu,ukko

If ObjectsOverlap(ukko,vihu) Then 
MakeError "sait "+pisteet+" pistettä!"                  
End If

If Timer() - aika> 3000
aika=Timer()
pist.score = New(score)
pist\obj=CloneObject(pis)
PositionObject pist\obj,Rand(150,-150),Rand(200,-200)  
End If 

For pist.score = Each score
If ObjectsOverlap(ukko,pist\obj) Then
pisteet+1  
Delete pist
DeleteObject pist\obj
End If 
Next pist


If Timer() - aia> 5000
aia=Timer()
pist2.score2 = New(score2)
pist2\obj=CloneObject(pis2)
PositionObject pist2\obj,Rand(150,-150),Rand(200,-200)  
End If 

For pist2.score2 = Each score2
If ObjectsOverlap(ukko,pist2\obj) Then
pisteet+5  
Delete pist2
DeleteObject pist2\obj
End If 
Next pist2


If Timer() - aik> 6000
aik=Timer()
vih.vihut = New(vihut)
vih\obj=CloneObject(vihu)
PositionObject vih\obj,Rand(150,-150),Rand(200,-200)  
End If 

For vih.vihut = Each vihut
MoveObject vih\obj, 2
PointObject vih\obj, ukko
If ObjectsOverlap(ukko,vih\obj) Then
MakeError "sait "+pisteet+" pistettä!"   
End If 
Next vih 

DrawScreen 

Forever 
kommentoikaa lisää
Last edited by ukkeli on Sat Jan 30, 2010 5:47 pm, edited 1 time in total.
...
Viltzu
Guru
Posts: 1132
Joined: Sun Aug 26, 2007 5:45 pm
Location: Alavieska
Contact:

Re: Pikku pelit

Post by Viltzu »

No totaa, käytä mieluusti ruudun kokona 320x240, 400x300, 800x600, 1024x786, 1680x1050(<-16:10 laajakuva)... jne..
Mitähän nuo nyt ois. Emt.. :roll:

Ja sitten itse pelistä, kannattaisi laittaa vihollisten ilmestyminen niin, että se ei voi tulla pelaajan kohdalle heti. Näin kävi minulle.
Tuo onnistuu helposti, arvot vain Randilla hieman erillätavalla: Rand(pelaajaY+200,400) Tuossa nyt vihollinen tulee 200-400 pikselin päähän pelaajasta, aina "ylös", eli siis ukon yläpuolelle... asdf... Sekä myös voit laittaa sen tulemaan sivulle käyttämällä vain pelaajan X sijaintia arvonnassa.
Ja jos hieman nätimmän haluaa voit kosinilla ja sinillä kikkailla vihollisen tulemisen aina pelaajan eteen, mutta niitä et kyllä tarvitse heti kovin alussa, jos et ole CB:hen(/ohjelmointiin) vielä paljon tutustunut.
jaahas

Re: Pikku pelit

Post by jaahas »

täs olis tällänen vaikeasti toteutettu laskin jossa voi laskea 1-9+1-9 laskuja 11 rivii lisää niin 100 riviä tekstiä :D

Code: Select all

alku:
CloseInput()
Repeat
txt = Input("eka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli
If txt = "2" Then Goto yli10
If txt = "3" Then Goto yli11
If txt = "4" Then Goto yli12
If txt = "5" Then Goto yli13
If txt = "6" Then Goto yli14
If txt = "7" Then Goto yli15
If txt = "8" Then Goto yli16
If txt = "9" Then Goto yli17
EndIf
DrawScreen
Forever
yli:
CloseInput()
Repeat
Text 100, 100, "1+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+1=2"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+2=3"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+3=4"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+4=5"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+5=6"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+6=7"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+7=8"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+8=9"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+9=10"
DrawScreen
Forever
yli10:
CloseInput()
Repeat
Text 100, 100, "2+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+1=3"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+2=4"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+3=5"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+4=6"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+5=7"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+6=8"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+7=9"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+8=10"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+9=11"
DrawScreen
Forever
yli11:
CloseInput()
Repeat
Text 100, 100, "3+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+1=4"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+2=5"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+3=6"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+4=7"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+5=8"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+6=9"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+7=10"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+8=11"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+9=12"
DrawScreen
Forever
yli12:
CloseInput()
Repeat
Text 100, 100, "4+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+1=5"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+2=6"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+3=7"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+4=8"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+5=9"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+6=10"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+7=11"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+8=12"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+9=13"
DrawScreen
Forever
yli13:
CloseInput()
Repeat
Text 100, 100, "5+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+1=6"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+2=7"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+3=8"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+4=9"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+510"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+6=11"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+7=12"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+8=13"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+9=14"
DrawScreen
Forever
yli14:
CloseInput()
Repeat
Text 100, 100, "6+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+1=7"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+2=8"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+3=9"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+4=10"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "+5=11"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+6=12"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+7=13"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+8=14"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+9=15"
DrawScreen
Forever
yli15:
CloseInput()
Repeat
Text 100, 100, "7+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+1=8"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+2=9"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+3=10"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+4=11"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+5=12"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+6=13"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+7=14"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+8=15"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+9=16"
DrawScreen
Forever
yli16:
CloseInput()
Repeat
Text 100, 100, "8+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+1=9"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+2=10"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+3=11"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+4=12"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+5=13"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+6=14"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+7=15"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+8=16"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+9=17"
DrawScreen
Forever
yli17:
CloseInput()
Repeat
Text 100, 100, "9+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+1=10"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+2=11"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+3=12"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+4=13"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+5=14"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+6=15"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+7=16"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+8=17"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+9=18"
DrawScreen
Forever
User avatar
kaneli2000
Guru
Posts: 1059
Joined: Mon Mar 17, 2008 2:40 pm
Location: Lempäälä

Re: Pikku pelit

Post by kaneli2000 »

Code: Select all

Olisitko kiltti ja laittaisit koodisi tällaisiin code-tageihin (valitset hiirellä koodiosuuden tekstistäsi ja painat "Code"-namikkaa tekstilaatikon yläpuolelta). Ei viitsisi lukea tuollaista.
I see the rainbow rising
jaahsas

Re: Pikku pelit

Post by jaahsas »

täs toi äskinen mut lyhempänä :D

Code: Select all

alku:
CloseInput()
Repeat
txt = Input("eka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli
If txt = "2" Then Goto yli10
If txt = "3" Then Goto yli11
If txt = "4" Then Goto yli12
If txt = "5" Then Goto yli13
If txt = "6" Then Goto yli14
If txt = "7" Then Goto yli15
If txt = "8" Then Goto yli16
If txt = "9" Then Goto yli17
EndIf
DrawScreen
Forever
yli:
CloseInput()
Repeat
Text 100, 100, "1+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+1=2"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+2=3"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+3=4"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+4=5"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+5=6"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+6=7"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+7=8"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+8=9"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+9=10"
DrawScreen
Forever
yli10:
CloseInput()
Repeat
Text 100, 100, "2+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+1=3"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+2=4"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+3=5"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+4=6"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+5=7"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+6=8"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+7=9"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+8=10"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+9=11"
DrawScreen
Forever
yli11:
CloseInput()
Repeat
Text 100, 100, "3+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+1=4"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+2=5"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+3=6"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+4=7"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+5=8"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+6=9"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+7=10"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+8=11"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+9=12"
DrawScreen
Forever
yli12:
CloseInput()
Repeat
Text 100, 100, "4+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+1=5"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+2=6"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+3=7"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+4=8"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+5=9"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+6=10"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+7=11"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+8=12"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+9=13"
DrawScreen
Forever
yli13:
CloseInput()
Repeat
Text 100, 100, "5+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+1=6"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+2=7"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+3=8"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+4=9"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+510"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+6=11"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+7=12"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+8=13"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+9=14"
DrawScreen
Forever
yli14:
CloseInput()
Repeat
Text 100, 100, "6+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+1=7"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+2=8"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+3=9"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+4=10"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "+5=11"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+6=12"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+7=13"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+8=14"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+9=15"
DrawScreen
Forever
yli15:
CloseInput()
Repeat
Text 100, 100, "7+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+1=8"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+2=9"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+3=10"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+4=11"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+5=12"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+6=13"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+7=14"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+8=15"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+9=16"
DrawScreen
Forever
yli16:
CloseInput()
Repeat
Text 100, 100, "8+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+1=9"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+2=10"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+3=11"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+4=12"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+5=13"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+6=14"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+7=15"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+8=16"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+9=17"
DrawScreen
Forever
yli17:
CloseInput()
Repeat
Text 100, 100, "9+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+1=10"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+2=11"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+3=12"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+4=13"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+5=14"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+6=15"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+7=16"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+8=17"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+9=18"
DrawScreen
Forever
jaahas

Re: Pikku pelit

Post by jaahas »

code juttu ei toiminu
jaahas

Re: Pikku pelit

Post by jaahas »

tjsyhshrths
MikkoK
Devoted Member
Posts: 813
Joined: Thu Jun 05, 2008 2:13 pm
Location: City 17

Re: Pikku pelit

Post by MikkoK »

HAHAHAHA!!! Code tagit toimivat näin. ["code] koodi ["/code] ilman noita " merkkejä.

Code: Select all

#aha. @ IRCNet
<Grandi> Voit laittaa jo valmiiks hailaittiin "Amis-Mikko", koska alan kutsua sua sillä nimellä.
jaahas

Re: Pikku pelit

Post by jaahas »

toimisko nyt

Code: Select all

alku:
CloseInput()
Repeat
txt = Input("eka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli
If txt = "2" Then Goto yli10
If txt = "3" Then Goto yli11
If txt = "4" Then Goto yli12
If txt = "5" Then Goto yli13
If txt = "6" Then Goto yli14
If txt = "7" Then Goto yli15
If txt = "8" Then Goto yli16
If txt = "9" Then Goto yli17
EndIf
DrawScreen
Forever
yli:
CloseInput()
Repeat
Text 100, 100, "1+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+1=2"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+2=3"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+3=4"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+4=5"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+5=6"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+6=7"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+7=8"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+8=9"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "1+9=10"
DrawScreen
Forever
yli10:
CloseInput()
Repeat
Text 100, 100, "2+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+1=3"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+2=4"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+3=5"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+4=6"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+5=7"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+6=8"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+7=9"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+8=10"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "2+9=11"
DrawScreen
Forever
yli11:
CloseInput()
Repeat
Text 100, 100, "3+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+1=4"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+2=5"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+3=6"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+4=7"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+5=8"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+6=9"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+7=10"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+8=11"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "3+9=12"
DrawScreen
Forever
yli12:
CloseInput()
Repeat
Text 100, 100, "4+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+1=5"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+2=6"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+3=7"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+4=8"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+5=9"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+6=10"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+7=11"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+8=12"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "4+9=13"
DrawScreen
Forever
yli13:
CloseInput()
Repeat
Text 100, 100, "5+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+1=6"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+2=7"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+3=8"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+4=9"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+510"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+6=11"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+7=12"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+8=13"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "5+9=14"
DrawScreen
Forever
yli14:
CloseInput()
Repeat
Text 100, 100, "6+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+1=7"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+2=8"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+3=9"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+4=10"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "+5=11"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+6=12"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+7=13"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+8=14"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "6+9=15"
DrawScreen
Forever
yli15:
CloseInput()
Repeat
Text 100, 100, "7+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+1=8"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+2=9"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+3=10"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+4=11"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+5=12"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+6=13"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+7=14"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+8=15"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "7+9=16"
DrawScreen
Forever
yli16:
CloseInput()
Repeat
Text 100, 100, "8+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+1=9"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+2=10"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+3=11"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+4=12"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+5=13"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+6=14"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+7=15"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+8=16"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "8+9=17"
DrawScreen
Forever
yli17:
CloseInput()
Repeat
Text 100, 100, "9+"
txt = Input("toka:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto yli1
If txt = "2" Then Goto yli2
If txt = "3" Then Goto yli3
If txt = "4" Then Goto yli4
If txt = "5" Then Goto yli5
If txt = "6" Then Goto yli6
If txt = "7" Then Goto yli7
If txt = "8" Then Goto yli8
If txt = "9" Then Goto yli9
EndIf
DrawScreen
Forever
yli1:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+1=10"
DrawScreen
Forever
yli2:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+2=11"
DrawScreen
Forever
yli3:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+3=12"
DrawScreen
Forever
yli4:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+4=13"
DrawScreen
Forever
yli5:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+5=14"
DrawScreen
Forever
yli6:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+6=15"
DrawScreen
Forever
yli7:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+7=16"
DrawScreen
Forever
yli8:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+8=17"
DrawScreen
Forever
yli9:
CloseInput()
Repeat
txt = Input("takaisin 1:")
If KeyHit(cbkeyreturn) Then
If txt = "1" Then Goto alku
EndIf
Text 180, 130, "9+9=18"
DrawScreen
Forever
Sly_Jack0
Devoted Member
Posts: 612
Joined: Mon Dec 10, 2007 8:25 am

Re: Pikku pelit

Post by Sly_Jack0 »

Ohhoh! Nyt ollaan sitten taas viisaampia. En ennen tiennyt, että asiat voi tehdä näinkin vaikeasti. ~1000 riviä?!?!?!
Awaclus
Forum Veteran
Posts: 2939
Joined: Tue Aug 28, 2007 2:50 pm

Re: Pikku pelit

Post by Awaclus »

Tuota noin, laskimesi voisi toteuttaa paljon yksinkertaisemminkin:

Code: Select all

Repeat
    num1 = Int (Input ("eka: "))
    DrawScreen
Until KeyHit (cbkeyreturn)
CloseInput
ClearKeys
Repeat
    DrawScreen
    num2 = Int (Input ("toka: "))
Until KeyHit (cbkeyreturn)
CloseInput
ClearKeys
AddText " "+num1+" + "+num2+" = "+Int(num1+num2)+""
DrawScreen
WaitKey
EDIT: lål, Datsuni got sarnath'd! Mutta teki kyllä vielä vähän pienempään tilaan, tosin.
Last edited by Awaclus on Wed Feb 03, 2010 1:43 pm, edited 1 time in total.
Post Reply