Laser Game CSE

When I was young, I played a very nice game with a laser and a target. Now I remembered that and I want to make it for my calc. So I started and voilą, here is my game.

Things to do:

- Winner/loser check

- Multiple levels

- A better look-up

And probably a lot more.

The most tricky part, is some seq(real( stuff, which works, as I don't expected.

Here's a .gif of it (sorry, it is a bit laggy)

And here is the full code, optimizations are welcome.

When all is ready, I want to upload it to the Archives. Hope you enjoy it!

When I was young, I played a very nice game with a laser and a target. Now I remembered that and I want to make it for my calc. So I started and voilą, here is my game.

Things to do:

- Winner/loser check

- Multiple levels

- A better look-up

And probably a lot more.

The most tricky part, is some seq(real( stuff, which works, as I don't expected.

Here's a .gif of it (sorry, it is a bit laggy)

And here is the full code, optimizations are welcome.

**Code:**```
ClrHome
```

If 80>det([[20

Then

Disp "Get DoorsCSE to run this:","http://dcs.cemetech.net"

Return

End

DelVar [A]{15,20->dim([A]

"rowSwap(LASER3"->Str0

1:det(0

expr(Str9->A

2:det(0

expr(Str9->B

For(A,1,dim(|LB

1->[A](|LB(A),|LA(A

End

"LASER"

real(5,0,0

3:det(0

real(0,1,1

seq(real(3,0,0,0,20,9,0,0,19,14,X),X,1,0,~1

DelVar ADelVar BDelVar KWhile min(Ans!={9,55

max(1,min(20,A+sum(DeltaList(K={2,3->A

max(1,min(15,B+sum(DeltaList(K={4,1->B

For(C,1,2

real(7,8,8A-8,8B-8,8,8,1

real(7,8,8A-8,8B-8,8,8,0

End

If [A](B,A) and max(K={49,53

Then

2+(K=49->[A](B,A

8A-8->S

8B-8->T

seq(real(7,5,S,Ans+7,S+7,Ans,128+103(K=53),X),X,1,0,~1

seq(real(7,5,S,T,S+7,T+7,231-103(K=53),X),X,1,0,~1

End

real(2,0,0->K

End

If K=55

Goto A

164->A

64->B

DelVar D~1->C

Repeat A<8 or A>164 or B<4 or B>126

real(7,3,A-8,B-4,255,1,1

real(7,3,A-8,B-4,255,1,0

A+C->A

B+D->B

If not(max(fPart(8^^-1{A-4,Ans

Then

[A](B/8,A/8-.5->S

If 1<Ans

Then

C->E

Dnot(C)(1-2(S=3->C

Enot(D)(1-2(S=3->D

End

End

End

Lbl A

seq(real(0,3,4,255,X),X,1,0,~1

real(0,1,0,1

When all is ready, I want to upload it to the Archives. Hope you enjoy it!