0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

IchigoJamで鬼ごっこプログラム

Posted at

今日、教室にきていたこどもたちと一緒につくりました!
IchigoJamの二人対戦型鬼ごっこゲームです。(コードはもっときれいにしたい)
友達と一緒にプレイして、ながくにげきろう!

遊び方

逃げる人 : ←↑→↓キーで移動
鬼 : WSADキーで移動

コード

10 CLS:CLT:X=0:Y=1:A=30:B=20
20 K=INKEY()
22 IF K!=0 LCX,Y:?" "
24 IF K!=0 LCA,B:?" "
30 IF K=30 Y=Y-1
40 IF K=31 Y=Y+1
50 IF K=28 X=X-1
60 IF K=29 X=X+1
70 IF K=87 B=B-1
80 IF K=83 B=B+1
90 IF K=68 A=A+1
95 IF K=65 A=A-1
100 IF X<0 X=0
101 IF X>30 X=30
105 IF Y<1 Y=1
106 IF Y>20 Y=20
110 IF A<0 A=0
111 IF A>30 A=30
115 IF B<1 B=1
116 IF B>20 B=20
200 LCX,Y:?CHR$(250)
210 LCA,B:?CHR$(237)
220 LC0,0:?TICK()
800 IF X=A && Y=B GOTO1000
900 GOTO20
1000 LCA+1,B:?"ツカマエタ"
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?