Re: TIB: help with Extreemly basic AI...


[Prev][Next][Index][Thread]

Re: TIB: help with Extreemly basic AI...






----------
>From: ETTamme1@aol.com
>To: ti-basic@lists.ticalc.org
>Subject: Re: TIB: help with Extreemly basic AI...
>Date: Wed, Oct 27, 1999, 4:04 PM
>

>
>     Hey id love to help you, but i cant open the file, it says its in an
> invalid format?  if you can fix it let me know and ill take a look see.
>     ~Eric
>

well, this is the code (i own a mac, that probly messed it up for you), i
think you can see ware the stores would go

ClrHome
1 A
1 B
1 C
3 D
8 I
4 J

Lbl 3
Output(A,B,"["
Output(C,D,"]"
Lbl 1
DelVar E
While E=0
Goto 4
Lbl 6
getKey E
End

If E=24 or E=25 or E=26 or E=34 or E=21
Then
Goto 2
Else
Goto 1
End
Lbl 2
If E=24
Then
ClrHome
B-1 B
D-1 D
Goto 3
End
If E=26
Then
ClrHome
B+1 B
D+1 D
Goto 3
End
If E=25
Then
ClrHome
A-1 A
C-1 C
Goto 3
End
If E=34
Then
ClrHome
A+1 A
C+1 C
Goto 3
End


If E=21
B+1E
DelVar F
While F‚5
Output(A,E,"*"
F+1F
End

If A=I and E=J
Then
Output(4,5,"YOU WIN"
Pause
Stop
End
ClrHome
Goto 3
Lbl 4
randInt(1,4,1)E
If E=1
Then
I+1I
Goto 5
End
If E=2
Then
I-1I
Goto 5
End
If E=3
Then
J+1 J
Goto 5
End
If E=4
Then
J-1 J
Goto 5
End
Lbl 5
Output(I,J,"°"
Goto 6


Follow-Ups: