DynamicModule[
{
X,(*点のx座標*)
Y,(*点のy座標*)
EndFlag=0,(*stopが押されたかを見るフラグ*)
StartFlag=0,(*初期状態かを見るフラグ*)
XFlag,(*点のx移動方向を見るフラグ*)
YFlag,(*点のy移動方向を見るフラグ*)
Score,(*獲得点数*)
Distance,(*中心からの距離の2乗*)
XSpeed,(*点のx方向の移動速度*)
YSpeed(*点のy方向の移動速度*)
},
{
Button[stop,EndFlag=1],
Button[Reset,StartFlag=0;EndFlag=0],
Animate[

If[StartFlag ==0,{
X=RandomInteger[{-10,10}];
Y=RandomInteger[{-10,10}];
XFlag=1;
YFlag=1;
EndFlag =0;
StartFlag=1;
Score=0;
Distance=0;
XSpeed=0.5;
YSpeed=1;
Scorepoint=Nothing;
}];

If[StartFlag==1&&EndFlag==0,{
If[XFlag==1,X+=XSpeed,X-=XSpeed];
If[YFlag==1,Y+=YSpeed,Y-=YSpeed];
If[X>9,XFlag=0];
If[X<-9,XFlag=1];
If[Y>9,YFlag=0];
If[Y<-9,YFlag=1];
}];

Wall={EdgeForm[{Thick,Black}],White,Rectangle[{-10.2,-10.2},{10.2,10.2}]};
Target10={EdgeForm[Thick],White,Disk[{0,0},10]};Target9={EdgeForm[Thick],White,Disk[{0,0},9]};Target8={EdgeForm[Thick],Black,Disk[{0,0},8]};Target7={EdgeForm[{Thick,White}],Black,Disk[{0,0},7]};Target6={EdgeForm[{Thick,Black}],Blue,Disk[{0,0},6]};Target5={EdgeForm[Thick],Blue,Disk[{0,0},5]};Target4={EdgeForm[Thick],Red,Disk[{0,0},4]};Target3={EdgeForm[Thick],Red,Disk[{0,0},3]};Target2={EdgeForm[Thick],Yellow,Disk[{0,0},2]};Target1={EdgeForm[Thick],Yellow,Disk[{0,0},1]};
Bow=Disk[{X,Y},0.2];

If[EndFlag==1,
XSpeed=0;
YSpeed=0;
Distance=X*X+Y*Y;

If[0≤Distance≤1,Score=10];
If[1<Distance≤4,Score=9];
If[4<Distance≤9,Score=8];
If[9<Distance≤16,Score=7];
If[16<Distance≤25,Score=6];
If[25<Distance≤36,Score=5];
If[36<Distance≤49,Score=4];
If[49<Distance≤64,Score=3];
If[64<Distance≤81,Score=2];
If[81<Distance≤100,Score=1];
If[100<Distance,Score=0];
finish=Text[Style[score,Large],{0,-12}];
Scorepoint =Text[Style[Score,FontSize->30],{0,-15}];
];

Graphics[{Wall,Target10,Target9,Target8,Target7,Target6,Target5,Target4,Target3,Target2,Target1,{Green,Bow},Scorepoint,finish},PlotRange->{{-12,12},{-20,12}},Frame->True,FrameTicks->None],
{t,0,Infinity}]}]