スコア=レベル×同時消しの二乗×10
の実装ですが、
同時消し の数は、ついさっき、
lcでカウントするようにしたので、
ほんのちょいと弄るだけです。
procedure TMapBlocks.DeleteBlocks;
var i:integer;
f:boolean;
lc:integer;
begin
(略)
if lc>0 then begin
Form1.level.Caption:=IntToStr(StrToInt(Form1.level.Caption)+1);
if Form1.level.Caption='100' then Form1.level.Caption:='99';
end;
end;
↓
procedure TMapBlocks.DeleteBlocks;
var i:integer;
f:boolean;
lc:integer;
begin
(略)
if lc>0 then begin
Form1.level.Caption:=IntToStr(StrToInt(Form1.level.Caption)+1);
if Form1.level.Caption='100' then Form1.level.Caption:='99';
end;
Form1.score.Caption:=
IntToStr(
StrToInt(Form1.score.Caption)+
(StrToInt(Form1.level.Caption)+1)*sqr(lc)*10
);
end;
スコアのcaptionを数値に直したものと、
レベルのcaptionを数値に直して1足したものと行数の二乗と10をかけたものを
足して、
また文字列に直してcaptionにはめなおしてます。
1足してるのは、レベル0だと*0で0点になっちゃうからね。
うーむ ゴリゴリウホウホ
コンテンツ
最新の12件
2023-06-12
2021-02-15
2013-06-19
2012-07-14
2012-02-04
2012-01-06
2011-03-31
2010-08-26
2010-03-15
2009-10-21
2009-02-12
2008-11-18
メニュー編集
- counter: 868
- today: 3
- yesterday: 1
- online: 1