Welcome![Sign In][Sign Up]
Location:
Search - TI R

Search list

[Other resourceWriting-Robust-Java-Code

Description: Purpose of this White Paper This white paper describes a collection of standards, conventions, and guidelines for writing solid Java code. They are based on sound, proven software engineering principles that lead to code that is easy to understand, to maintain, and to enhance. Furthermore, by following these coding standards your productivity as a Java developer should increase remarkably – Experience shows that by taking the time to write high-quality code right from the start you will have a much easier time modifying it during the development process. Finally, following a common set of coding standards leads to greater consistency, making teams of developers significantly more productive.-Purpose of this White Paper This white pape r describes a collection of standards, conventions, and guidelines for solid writing Java code. The y are based on sound, proven software engineering principles that l perf to code that is easy to understand, to maintain, and to enhance. Furthermore, by following these coding standards your produ ctivity as a Java developer should increase poise arkably - Experience shows that by taking the ti me to write high-quality code right from the sta rt you will have a much easier time modifying it d uring the development process. Finally, following a common set of coding standards lead s to greater consistency. making teams of developers significantly more productive.
Platform: | Size: 393781 | Author: 许任 | Hits:

[Other resourceRTOSICCAVR

Description: UCOS/II for ICCAVR - The version of UCOS/II is 2.04 - the original port was done by Ole Saether for the IAR compiler. Jens E. Holtegaard ported one version using ICCAVR. Joerg Meyer did another port (using Jens port as a start?). This is basically Joerg s port plus a little bit of changes and documentation by me. - YOU MUST DOWNLOAD THE MAIN PART OF THE UCOS/II FROM THE UCOS/II WEBSITE http://www.ucos-ii.com . The supplied project file assumes the portable source is in the ..\\source directory. - Joerg has written couple document showing the stack frames etc. but it is in German :-) They are included in this directory. - The Timer2 overflow interrupt is used for Timer Tick. If you want to change that, modify os_cpu_c.c and os_cpu_a.s - I have tested this using ATMega103 with and without external RAM using AVR Studio simulator. See test1.c test program. Both Code Compressed (PRO) and STD versions have been tested. -UCOS / II for ICCAVR - The version of UCOS / II is 2.04-the original port was done by Ole Saethe r for the IAR compiler. Jens E. Holtegaard porte d one version using ICCAVR. Joerg Meyer did anot her port (using Jens port as a start). This is bas ically Joerg's port plus a little bit of changes a nd documentation by me. - YOU MUST DOWNLOAD THE M AIN PART OF THE UCOS / FROM THE UCOS II / II WEBSITE http : / / www.ucos - ii.com. The supplied project file assumes the portable source is in the .. \\ source directory. - Joerg couple has written document showing the stack frames etc.. but it is in German :-) They are included in this directory. - The Ti mer2 overflow interrupt is used for Timer tick. If you want to change that. modify os_cpu_c.c and os_cpu_a.s - I have teste d this using ATMeg
Platform: | Size: 200913 | Author: zhjol | Hits:

[Other Games瑪莉台(老虎機)

Description:

var
  Form1: TForm1;
  MousePos: TPoint;
  bet_x : Integer;
  bet_y : Integer;
  i, j, k, l, r, m, n : integer;// i:大迴圈 J:跑燈迴圈 K:倍數燈 L:倍數燈 M:大小燈  n:比倍迴圈
  left_bai, right_bai : Integer; //左邊倍數..右邊倍數
  Ti, Tj : Cardinal; //迴圈時間 , 押注連續時間
  rb, rd : integer;//加速用定位
  score : Integer;//現有分數
  take_score : Integer;//得分
  bet_ok : Boolean;    //押注完成
  re_bet : Boolean;    //重新押注
  bar_bet, seven_bet, star_bet, Watermelon_bet, bell_bet, Lemon_bet, Orange_bet, apple_bet : Integer;
  bar_bet_full, seven_bet_full, star_bet_full, Watermelon_bet_full, bell_bet_full, Lemon_bet_full, Orange_bet_full, apple_bet_full : Boolean; //下注全滿
  bet_all : Integer;//押注總和
  runing : Boolean; //正在跑燈
  not_take_score : Boolean;//是否已經取回得分
  big_small : Integer;  //大小  大:0  小:1
implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  if (not AsphyreDevice1.Initialize()) then
  begin
   Close();
   Exit;
  end;

  Randomize;
  Ti := 451; //毫秒
  score := 5000;
  bet_ok := False;
  runing := False;
  re_bet := True;
  not_take_score := False;
  Tj := 50;
  PlaySound('R_21',hinstance,SND_ASYNC or SND_RESOURCE);

end;

procedure TForm1.AsphyreDevice1Initialize(Sender: TObject;
  var Success: Boolean);
begin
  Success:=AsphyreFonts1.LoadFromASDb(ASDb1);
  if (Success) then
  Success:=AsphyreImages1.LoadFromASDb(ASDB1);
  //if (Success) then SoundSystem1.LoadFromASDb(ASDb1);
  AsphyreTimer1.Enabled:= Success;
end;

procedure TForm1.AsphyreDevice1Render(Sender: TObject);
begin
  AsphyreCanvas1.Draw(AsphyreImages1.Image['23ok1.image'],0,0,0,1); //背景加載
  AsphyreFonts1[2].TextOut(format('%6s',[IntToStr(score)]), 232,56, $FF2425FF); //資金顯示( $FF0400FF 正紅 )
  AsphyreFonts1[2].TextOut(format('%6s',[IntToStr(take_score)]), 66,56, $FF2425FF); //得分顯示( $FF0400FF 正紅 )
  AsphyreFonts1[2].TextOut(format('%2s',[IntToStr(bar_bet)]), 18,523, $FF2425FF); //BAR押注顯示( $FF0400FF 正紅 )
  AsphyreFonts1[2].TextOut(format('%2s',[IntToStr(seven_bet)]), 64,523, $FF2425FF); //77押注顯示( $FF0400FF 正紅 )
  AsphyreFonts1[2].TextOut(format('%2s',[IntToStr(star_bet)]), 112,523, $FF2425FF); //双星押注顯示( $FF0400FF 正紅 )
  AsphyreFonts1[2].TextOut(format('%2s',[IntToStr(Watermelon_bet)]), 159,523, $FF2425FF); //西瓜押注顯示( $FF0400FF 正紅 )
  AsphyreFonts1[2].TextOut(format('%2s',[IntToStr(bell_bet)]), 206,523, $FF2425FF); //鈴鐺押注顯示( $FF0400FF 正紅 )
  AsphyreFonts1[2].TextOut(format('%2s',[IntToStr(Lemon_bet)]), 253,523, $FF2425FF); //檸檬押注顯示( $FF0400FF 正紅 )
  AsphyreFonts1[2].TextOut(format('%2s',[IntToStr(Orange_bet)]), 300,523, $FF2425FF); //橘子押注顯示( $FF0400FF 正紅 )
  AsphyreFonts1[2].TextOut(format('%2s',[IntToStr(apple_bet)]), 347,523, $FF2425FF); //蘋果押注顯示( $FF0400FF 正紅 )
  //AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 174,90+i,0,1);
  Demo;
  Form1.FormStyle := fsStayOnTop;
  if (bet_x > 267) and (bet_x < 374) and (bet_y > 555) and (bet_y < 588) then AsphyreCanvas1.Draw(AsphyreImages1.Image['start4.image'], 265,555,0,1);
  if (bet_x > 24) and (bet_x < 83) and (bet_y > 559) and (bet_y < 587) then AsphyreCanvas1.Draw(AsphyreImages1.Image['big2.image'], 24,559,0,1);
  if (bet_x > 89) and (bet_x < 144) and (bet_y > 559) and (bet_y < 587) then AsphyreCanvas1.Draw(AsphyreImages1.Image['small2.image'], 89,559,0,1);
end;

procedure TForm1.AsphyreTimer1Timer(Sender: TObject);
begin
  AsphyreDevice1.Render(0,true);
  AsphyreDevice1.Flip;
end;

procedure TForm1.Demo();     //選擇性顯示
begin
    case j of
      1 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 174,90,0,fxMax);
      2 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 224,90,0,fxMax);
      3 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 276,90,0,fxMax);
      4 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 326,90,0,fxMax);
      5 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 326,142,0,fxMax);
      6 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 326,192,0,fxMax);
      7 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 326,244,0,fxMax);
      8 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 326,294,0,fxMax);
      9 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 326,346,0,fxMax);
      10 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 326,398,0,fxMax);
      11 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 276,398,0,fxMax);
      12 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 224,398,0,fxMax);
      13 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 174,398,0,fxMax);
      14 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 122,398,0,fxMax);
      15 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 71,398,0,fxMax);
      16 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 20,398,0,fxMax);
      17 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 20,346,0,fxMax);
      18 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 20,294,0,fxMax);
      19 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 20,244,0,fxMax);
      20 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 20,192,0,fxMax);
      21 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 20,142,0,fxMax);
      22 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 20,90,0,fxMax);
      23 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 71,90,0,fxMax);
      24 : AsphyreCanvas1.Draw(AsphyreImages1.Image['1.image'], 122,90,0,fxMax);
    end;
    case k of
      1 : AsphyreCanvas1.Draw(AsphyreImages1.Image['-2.image'], 74,454,0,fxMax);
      2 : AsphyreCanvas1.Draw(AsphyreImages1.Image['-2.image'], 121,454,0,fxMax);
      3 : AsphyreCanvas1.Draw(AsphyreImages1.Image['-2.image'], 167,454,0,fxMax);
    end;
    case l of
      1 : AsphyreCanvas1.Draw(AsphyreImages1.Image['-2.image'], 309,454,0,fxMax);
      2 : AsphyreCanvas1.Draw(AsphyreImages1.Image['-2.image'], 261,454,0,fxMax);
      3 : AsphyreCanvas1.Draw(AsphyreImages1.Image['-2.image'], 215,454,0,fxMax);
    end;
    case m of
      1 : AsphyreCanvas1.Draw(AsphyreImages1.Image['-1.image'], 123,285,0,fxMax);
      2 : AsphyreCanvas1.Draw(AsphyreImages1.Image['-1.image'], 244,285,0,fxMax);
    end;
end;


procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if (x > 267) and (x < 374) and (y > 555) and (y < 588) or    //这里是改变鼠标样子的 --開始
     (x > 14) and (x < 55) and (y > 492) and (y < 546) or //--BAR
     (x > 61) and (x < 101) and (y > 492) and (y < 546) or  //--77
     (x > 109) and (x < 149) and (y > 492) and (y < 546) or  // --双星
     (x > 155) and (x < 197) and (y > 492) and (y < 546) or  // --西瓜
     (x > 203) and (x < 243) and (y > 492) and (y < 546) or  //  --鈴鐺
     (x > 249) and (x < 289) and (y > 492) and (y < 546) or  //  --檸檬
     (x > 297) and (x < 337) and (y > 492) and (y < 546) or  //  --橘子
     (x > 344) and (x < 384) and (y > 492) and (y < 546) or  //  --蘋果
     (x > 24) and (x < 83) and (y > 559) and (y < 587) or    //  --押大
     (x > 89) and (x < 144) and (y > 559) and (y < 587) then //  --壓小
     begin
       form1.Cursor := crHandPoint //进入这个区域,鼠标变成手型
     end
  else
    form1.Cursor := crDefault; //离开时,恢复默认鼠标

GetCursorPos(MousePos);
//Form1.Caption:='相對座標'+IntToStr(x)+','+IntToStr(y) + '絕對座標'+IntToStr(MousePos.X)+','+IntToStr(MousePos.Y);
bet_x := x;
bet_y := y;

end;



procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if (x > 267) and (x < 374) and (y > 555) and (y < 588) then // --開始
    begin


    end;
  if (x > 14) and (x < 55) and (y > 492) and (y < 546) then  //--BAR 押分
    begin

    end;
  if (x > 109) and (x < 149) and (y > 492) and (y < 546) then  //--77 押分
  begin

  end;
  if (x > 109) and (x < 149) and (y > 492) and (y < 546) then    // --双星
  begin

  end;
  if (x > 155) and (x < 197) and (y > 492) and (y < 546) then     // --西瓜
  begin

  end;
  if (x > 203) and (x < 243) and (y > 492) and (y < 546) then     //  --鈴鐺
  begin

  end;
  if (x > 249) and (x < 289) and (y > 492) and (y < 546) then      //  --檸檬
  begin

  end;
  if (x > 297) and (x < 337) and (y > 492) and (y < 546) then      //  --橘子
  begin

  end;
  if (x > 344) and (x < 384) and (y > 492) and (y < 546) then   //  --蘋果
  begin

  end;
end;


procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if (x > 267) and (x < 374) and (y > 555) and (y < 588) then // --開始壓下檢查
     begin
       if (not runing) then
       begin
         if (take_score > 0) then
           begin
             PlaySound('R_1',hinstance,SND_ASYNC or SND_RESOURCE);
             score := take_score + score;
             take_score := 0;
           end
           else
             start_key();
       end;
     end;
  if (x > 14) and (x < 55) and (y > 492) and (y < 546) then  //--BAR 押分
    begin

    end;
  if (x > 61) and (x < 101) and (y > 492) and (y < 546) then  //--77 押分
    begin

    end;
  if (x > 109) and (x < 149) and (y > 492) and (y < 546) then    // --双星
  begin

  end;
  if (x > 155) and (x < 197) and (y > 492) and (y < 546) then     // --西瓜
  begin

  end;
  if (x > 203) and (x < 243) and (y > 492) and (y < 546) then     //  --鈴鐺
  begin

  end;
  if (x > 249) and (x < 289) and (y > 492) and (y < 546) then      //  --檸檬
  begin

  end;
  if (x > 297) and (x < 337) and (y > 492) and (y < 546) then      //  --橘子
  begin

  end;
  if (x > 344) and (x < 384) and (y > 492) and (y < 546) then   //  --蘋果
  begin

  end;
  if (x > 24) and (x < 83) and (y > 559) and (y < 587) then   //  --押大
  begin
    if (take_score >= 1) then
    begin
      big_small := 0;
      r := random(4);
      Timer2.Enabled := True;
    end;
  end;
  if (x > 89) and (x < 144) and (y > 559) and (y < 587) then   //  --押小
  begin
    if (take_score >= 1) then
    begin
      big_small := 1;
      r := random(4);
      Timer2.Enabled := True;
    end;
  end;
  if (x > 201) and (x < 221) and (y > 54) and (y < 74) then  //移動分數
    begin

    end;

end;


procedure TForm1.Timer1Timer(Sender: TObject);    //跑燈
var
  ra : integer;//總步數
begin
  runing := True;
  Timer1.Interval := Ti;
  ra := 72;
  ra := ra + r;
  rb := rb + 1;
  i := i + 1;

  if (rb < 10) then
    begin
      Ti := Ti - 50; //加速
      PlaySound('R_1',hinstance,SND_ASYNC or SND_RESOURCE);
    end;
  if (i > ra-12) then
    begin
      Ti := Ti + 50;//減速
      PlaySound('R_1',hinstance,SND_ASYNC or SND_RESOURCE);
    end;
  j := j + 1;
  if (j >= 25) then j := 1;

  k := k + 1;
  if (k >= 4) then  k := 1;

  l := l + 1;
  if (l >= 4) then l := 1;

  {m := m + 1;
  if (m >= 3) then m := 1;}
  //PlaySound('R_1',hinstance,SND_ASYNC or SND_RESOURCE);
  //SoundSystem1.Play('Unti1.wav', False);
  Form1.Caption := inttostr(Ti) + '-j:' + inttostr(j) + '-r:' + IntToStr(r) + '-ra:' + IntToStr(ra) + '--rb:' + IntToStr(rb) + '__';
  if (i >= ra) then //燈跑完後要做的事
  begin
    Timer1.Enabled := False;
    Ti := 451;
    rb := 0;
    i := j+1;
    take_allscore();
  end;
end;

procedure TForm1.Timer2Timer(Sender: TObject);
var
  rc : integer;//總步數
begin
  runing := True;
  Timer2.Interval := Tj;
  rc := 12;
  rc := rc + r;
  rd := rd + 1;
  n := 1 + n;
  if (n >= rc) then //燈跑完後要做的事
  begin
    Timer2.Enabled := False;
    Tj := 50;
    rd := 1;
    n := 0;
    bi_bai_take_allscore();
  end;
 
  if (n > rc-12) then
    begin
      Tj := Tj + 50;//減速
      PlaySound('R_1',hinstance,SND_ASYNC or SND_RESOURCE);
    end;

  m := m + 1;
  if (m >= 3) then m := 1;
end;



procedure TForm1.take_allscore();
begin
  case k of
      1 : left_bai := 40;
      2 : left_bai := 30;
      3 : left_bai := 20;
    end;

  case k of
      1 : right_bai := 10;
      2 : right_bai := 20;
      3 : right_bai := 15;
    end;

  case j of
      1 : begin
          if (bar_bet >= 1) then
          begin
             PlaySound('R_11',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := bar_bet * 100;
          end;
           end;
      2 : begin
          if (apple_bet >= 1) then
          begin
            PlaySound('R_18',hinstance,SND_ASYNC or SND_RESOURCE);
            take_score := apple_bet * 5;
          end;
          end;
      3 : begin
          if (Lemon_bet >= 1) then
          begin
            PlaySound('R_16',hinstance,SND_ASYNC or SND_RESOURCE);
            take_score := Lemon_bet * 2;
          end;
          end;
      4 : begin
          if (Lemon_bet >= 1) then
          begin
            PlaySound('R_16',hinstance,SND_ASYNC or SND_RESOURCE);
            take_score := Lemon_bet * right_bai;
          end;
          end;
      5 : begin
          if (Watermelon_bet >= 1) then
          begin
            PlaySound('R_14',hinstance,SND_ASYNC or SND_RESOURCE);
            take_score := Watermelon_bet * left_bai;
          end;
          end;
      6 : begin
          if (Watermelon_bet >= 1) then
          begin
            PlaySound('R_14',hinstance,SND_ASYNC or SND_RESOURCE);
            take_score := Watermelon_bet * 2;
          end;
          end;
      7 : begin
            take_score := 0;
          end;
      8 : begin
          if (apple_bet >= 1) then
          begin
            PlaySound('R_18',hinstance,SND_ASYNC or SND_RESOURCE);
            take_score := apple_bet * 5;
          end;
          end;
      9 : begin
          if (Orange_bet >= 1) then
          begin
            PlaySound('R_17',hinstance,SND_ASYNC or SND_RESOURCE);
            take_score := Orange_bet * 2;
          end;
          end;
      10 : begin
           if (Orange_bet >= 1) then
           begin
            PlaySound('R_17',hinstance,SND_ASYNC or SND_RESOURCE);
            take_score := Orange_bet * right_bai;
           end;
          end;
      11 : begin
           if (bell_bet >= 1) then
           begin
             PlaySound('R_15',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := bell_bet * right_bai;
           end;
           end;
      12 : begin
           if (bell_bet >= 1) then
           begin
             PlaySound('R_15',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := bell_bet * 2;
           end;
           end;
      13 : begin
           if (seven_bet >= 1) then
           begin
             PlaySound('R_12',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := seven_bet * left_bai;
           end;
           end;
      14 : begin
           if (apple_bet >= 1) then
           begin
             PlaySound('R_18',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := apple_bet * 5;
           end;
           end;
      15 : begin
           if (apple_bet >= 1) then
           begin
             PlaySound('R_18',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := apple_bet * 2;
           end;
           end;
      16 : begin
           if (Lemon_bet >= 1) then
           begin
             PlaySound('R_16',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := Lemon_bet * right_bai;
           end;
           end;
      17 : begin
           if (star_bet >= 1) then
           begin
             PlaySound('R_13',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := star_bet * left_bai;
           end;
           end;
      18 : begin
           if (star_bet >= 1) then
           begin
             PlaySound('R_13',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := star_bet * 2;
           end;
           end;
      19 : begin
             take_score := 0;
           end;
      20 : begin
           if (apple_bet >= 1) then
           begin
             PlaySound('R_18',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := apple_bet * 5;
           end;
           end;
      21 : begin
           if (seven_bet >= 1) then
           begin
             PlaySound('R_12',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := seven_bet * 2;
           end;
           end;
      22 : begin
           if (Orange_bet >= 1) then
           begin
             PlaySound('R_17',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := Orange_bet * right_bai;
           end;
           end;
      23 : begin
           if (bell_bet >= 1) then
           begin
             PlaySound('R_11',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := bell_bet * right_bai;
           end;
           end;
      24 : begin
           if (bar_bet >= 1) then
           begin
             PlaySound('R_18',hinstance,SND_ASYNC or SND_RESOURCE);
             take_score := bar_bet * 50;
           end;
           end;
    end;

  runing := False;
  bet_ok := False;;
  re_bet := True;
  bar_bet_full := False;
  seven_bet_full := False;
  star_bet_full := False;
  Watermelon_bet_full := False;
  bell_bet_full := False;
  Lemon_bet_full := False;
  Orange_bet_full := False;
  apple_bet_full := False;
end;

procedure TForm1.bi_bai_take_allscore();
begin
  case m of
      1 : if (big_small = 1) then
          begin
            take_score := take_score * 2;
            PlaySound('R_19',hinstance,SND_ASYNC or SND_RESOURCE);
          end
            else
            begin
            take_score := 0;
            PlaySound('R_20',hinstance,SND_ASYNC or SND_RESOURCE);
            end;
      2 : if (big_small = 0) then
          begin
            take_score := take_score * 2;
            PlaySound('R_19',hinstance,SND_ASYNC or SND_RESOURCE);
          end
            else
            begin
            take_score := 0;
            PlaySound('R_20',hinstance,SND_ASYNC or SND_RESOURCE);
            end;
    end;

  runing := False;
  bet_ok := False;;
  re_bet := True;
  bar_bet_full := False;
  seven_bet_full := False;
  star_bet_full := False;
  Watermelon_bet_full := False;
  bell_bet_full := False;
  Lemon_bet_full := False;
  Orange_bet_full := False;
  apple_bet_full := False;
end;



procedure TForm1.start_key();
begin
  bet_all := bar_bet + seven_bet + star_bet + Watermelon_bet + bell_bet + Lemon_bet + Orange_bet + apple_bet;
  if (not runing) then
     begin
       if (take_score >= 0) then
          begin
            score := take_score + score;
            take_score := 0;
            if (bar_bet >= 1) or (seven_bet >= 1) or (star_bet >= 1) or (Watermelon_bet >= 1) or
               (bell_bet >= 1) or (Lemon_bet >= 1) or (Orange_bet >= 1) or (apple_bet >= 1) then
               Begin
                 if re_bet then
                 begin
                   if (score >= bet_all) then
                   begin
                     score := score - bet_all;
                     bet_ok := True;
                   end
                   else
                   begin
                     bet_ok := False;
                     Exit;
                   end;
                 end;
                 if bet_ok then
                 begin
                   r := random(24);
                   Timer1.Enabled := True;
                 end;
               end;
          end;
     end;
end;




procedure TForm1.FormMouseWheelDown(Sender: TObject; Shift: TShiftState;
  MousePos: TPoint; var Handled: Boolean);
begin
  if (bet_x > 14) and (bet_x < 55) and (bet_y > 492) and (bet_y < 546) then  //--BAR 押分
    begin
      if (not runing) then
      begin
        if (score >= 1) then
        begin
          if re_bet then
          begin
            score := take_score + score;
            take_score := 0;

            bar_bet := 0;
            seven_bet := 0;
            star_bet := 0;
            Watermelon_bet := 0;
            bell_bet := 0;
            Lemon_bet := 0;
            Orange_bet := 0;
            apple_bet := 0;
            re_bet := False;
          end
          else
          begin
            if (bar_bet >= 99) then
            begin
              bar_bet_full := True;
            end
            else
            begin
              PlaySound('R_2',hinstance,SND_ASYNC or SND_RESOURCE);
              score := score - 1;
              bar_bet := bar_bet + 1;
              bet_ok := True;
            end;
          end;
        end;
      end;
    end;
  if (bet_x > 61) and (bet_x < 101) and (bet_y > 492) and (bet_y < 546) then  //--77 押分
    begin
      if (not runing) then
      begin
        if (score >= 1) then
        begin
          if re_bet then
          begin
            score := take_score + score;
            take_score := 0;
            bar_bet := 0;
            seven_bet := 0;
            star_bet := 0;
            Watermelon_bet := 0;
            bell_bet := 0;
            Lemon_bet := 0;
            Orange_bet := 0;
            apple_bet := 0;
            re_bet := False;
          end
          else
          begin
            if (seven_bet >= 99) then
            begin
              seven_bet_full := True;
            end
            else
            begin
              PlaySound('R_3',hinstance,SND_ASYNC or SND_RESOURCE);
              score := score - 1;
              seven_bet := seven_bet + 1;
              bet_ok := True;
            end;
          end;
        end;
      end;
    end;
  if (bet_x > 109) and (bet_x < 149) and (bet_y > 492) and (bet_y < 546) then  //--star 押分
    begin
      if (not runing) then
      begin
        if (score >= 1) then
        begin
          if re_bet then
          begin
            score := take_score + score;
            take_score := 0;
            bar_bet := 0;
            seven_bet := 0;
            star_bet := 0;
            Watermelon_bet := 0;
            bell_bet := 0;
            Lemon_bet := 0;
            Orange_bet := 0;
            apple_bet := 0;
            re_bet := False;
          end
          else
          begin
            if (star_bet >= 99) then
            begin
              star_bet_full := True;
            end
            else
            begin
              PlaySound('R_4',hinstance,SND_ASYNC or SND_RESOURCE);
              score := score - 1;
              star_bet := star_bet + 1;
              bet_ok := True;
            end;
          end;
        end;
      end;
    end;
  if (bet_x > 155) and (bet_x < 197) and (bet_y > 492) and (bet_y < 546) then  //--西瓜 押分
    begin
      if (not runing) then
      begin
        if (score >= 1) then
        begin
          if re_bet then
          begin
            score := take_score + score;
            take_score := 0;
            bar_bet := 0;
            seven_bet := 0;
            star_bet := 0;
            Watermelon_bet := 0;
            bell_bet := 0;
            Lemon_bet := 0;
            Orange_bet := 0;
            apple_bet := 0;
            re_bet := False;
          end
          else
          begin
            if (Watermelon_bet >= 99) then
            begin
              watermelon_bet_full := True;
            end
            else
            begin
              PlaySound('R_5',hinstance,SND_ASYNC or SND_RESOURCE);
              score := score - 1;
              watermelon_bet := watermelon_bet + 1;
              bet_ok := True;
            end;
          end;
        end;
      end;
    end;
  if (bet_x > 203) and (bet_x < 243) and (bet_y > 492) and (bet_y < 546) then  //--鈴鐺 押分
    begin
      if (not runing) then
      begin
        if (score >= 1) then
        begin
          if re_bet then
          begin
            score := take_score + score;
            take_score := 0;
            bar_bet := 0;
            seven_bet := 0;
            star_bet := 0;
            Watermelon_bet := 0;
            bell_bet := 0;
            Lemon_bet := 0;
            Orange_bet := 0;
            apple_bet := 0;
            re_bet := False;
          end
          else
          begin
            if (bell_bet >= 99) then
            begin
              bell_bet_full := True;
            end
            else
            begin
              PlaySound('R_6',hinstance,SND_ASYNC or SND_RESOURCE);
              score := score - 1;
              bell_bet := bell_bet + 1;
              bet_ok := True;
            end;
          end;
        end;
      end;
    end;
  if (bet_x > 249) and (bet_x < 289) and (bet_y > 492) and (bet_y < 546) then  //--檸檬 押分
    begin
      if (not runing) then
      begin
        if (score >= 1) then
        begin
          if re_bet then
          begin
            score := take_score + score;
            take_score := 0;
            bar_bet := 0;
            seven_bet := 0;
            star_bet := 0;
            Watermelon_bet := 0;
            bell_bet := 0;
            Lemon_bet := 0;
            Orange_bet := 0;
            apple_bet := 0;
            re_bet := False;
          end
          else
          begin
            if (lemon_bet >= 99) then
            begin
              lemon_bet_full := True;
            end
            else
            begin
              PlaySound('R_7',hinstance,SND_ASYNC or SND_RESOURCE);
              score := score - 1;
              lemon_bet := lemon_bet + 1;
              bet_ok := True;
            end;
          end;
        end;
      end;
    end;
  if (bet_x > 297) and (bet_x < 337) and (bet_y > 492) and (bet_y < 546) then  //--橘子 押分
    begin
      if (not runing) then
      begin
        if (score >= 1) then
        begin
          if re_bet then
          begin
            score := take_score + score;
            take_score := 0;
            bar_bet := 0;
            seven_bet := 0;
            star_bet := 0;
            Watermelon_bet := 0;
            bell_bet := 0;
            Lemon_bet := 0;
            Orange_bet := 0;
            apple_bet := 0;
            re_bet := False;
          end
          else
          begin
            if (orange_bet >= 99) then
            begin
              orange_bet_full := True;
            end
            else
            begin
              PlaySound('R_8',hinstance,SND_ASYNC or SND_RESOURCE);
              score := score - 1;
              orange_bet := orange_bet + 1;
              bet_ok := True;
            end;
          end;
        end;
      end;
    end;
  if (bet_x > 344) and (bet_x < 384) and (bet_y > 492) and (bet_y < 546) then  //--蘋果 押分
    begin
      if (not runing) then
      begin
        if (score >= 1) then
        begin
          if re_bet then
          begin
            score := take_score + score;
            take_score := 0;
            bar_bet := 0;
            seven_bet := 0;
            star_bet := 0;
            Watermelon_bet := 0;
            bell_bet := 0;
            Lemon_bet := 0;
            Orange_bet := 0;
            apple_bet := 0;
            re_bet := False;
          end
          else
          begin
            if (apple_bet >= 99) then
            begin
              apple_bet_full := True;
            end
            else
            begin
              PlaySound('R_9',hinstance,SND_ASYNC or SND_RESOURCE);
              score := score - 1;
              apple_bet := apple_bet + 1;
              bet_ok := True;
            end;
          end;
        end;
      end;
    end;
  if bar_bet_full and seven_bet_full and star_bet_full and Watermelon_bet_full and bell_bet_full and Lemon_bet_full and Orange_bet_full and apple_bet_full then
  begin
    start_key();
  end;
end;





procedure TForm1.FormDblClick(Sender: TObject);
begin
  if (not runing) then
      begin
        if (score >= 1) then
        begin
          if (score >= 792) then
          begin
          if re_bet then
          begin
            score := take_score + score;
            take_score := 0;

            bar_bet := 0;
            seven_bet := 0;
            star_bet := 0;
            Watermelon_bet := 0;
            bell_bet := 0;
            Lemon_bet := 0;
            Orange_bet := 0;
            apple_bet := 0;
            re_bet := False;
          end
          else
  &
Platform: | Size: 4438122 | Author: 039917 | Hits:

[OS program20041223205631590

Description: 包内的bat可以安装和反安装服务。 用到了trayicon组件。服务启动后在图标区生成两个图标,一个右键弹出,另一个双击弹出。 示范程序在安装和反安装服务都没问题,设成自动启动后开机也自启动。就是关机时没处理关机消息,这部分还得补充。-the bat kits can be installed an ti-installation services. Depleted trayicon components. After commencement of the service area generated two icon icon, a pop-up right, another double-click pop-up. Model procedures in the installation and installation services-no problem, set to start automatically after the boot is also self-starting. Shutdown is not handling news shutdown, which had to add some.
Platform: | Size: 13312 | Author: 陈龙 | Hits:

[Ftp ClientSEEDVPM642_net

Description: TI的DSP网络部分网络的接口测试的程序。通过闭环发送和接收。程序为TI编写,网络队列和堆栈的操作十分经典。-TI DSP network parts of the network interface test procedures. Through closed-loop send and receive. TI procedures for the preparation, network stack and queue operation classical.
Platform: | Size: 487424 | Author: 靳朝 | Hits:

[Otherdongtaixindiantu

Description: 关于心电图的ppt,讲解的比较好,做这方面设计的朋友可以看下-on ECG ppt, on the better, so that the designs of friends facie
Platform: | Size: 281600 | Author: | Hits:

[OtherWriting-Robust-Java-Code

Description: Purpose of this White Paper This white paper describes a collection of standards, conventions, and guidelines for writing solid Java code. They are based on sound, proven software engineering principles that lead to code that is easy to understand, to maintain, and to enhance. Furthermore, by following these coding standards your productivity as a Java developer should increase remarkably – Experience shows that by taking the time to write high-quality code right from the start you will have a much easier time modifying it during the development process. Finally, following a common set of coding standards leads to greater consistency, making teams of developers significantly more productive.-Purpose of this White Paper This white pape r describes a collection of standards, conventions, and guidelines for solid writing Java code. The y are based on sound, proven software engineering principles that l perf to code that is easy to understand, to maintain, and to enhance. Furthermore, by following these coding standards your produ ctivity as a Java developer should increase poise arkably- Experience shows that by taking the ti me to write high-quality code right from the sta rt you will have a much easier time modifying it d uring the development process. Finally, following a common set of coding standards lead s to greater consistency. making teams of developers significantly more productive.
Platform: | Size: 393216 | Author: 许任 | Hits:

[uCOSRTOSICCAVR

Description: UCOS/II for ICCAVR - The version of UCOS/II is 2.04 - the original port was done by Ole Saether for the IAR compiler. Jens E. Holtegaard ported one version using ICCAVR. Joerg Meyer did another port (using Jens port as a start?). This is basically Joerg s port plus a little bit of changes and documentation by me. - YOU MUST DOWNLOAD THE MAIN PART OF THE UCOS/II FROM THE UCOS/II WEBSITE http://www.ucos-ii.com . The supplied project file assumes the portable source is in the ..\source directory. - Joerg has written couple document showing the stack frames etc. but it is in German :-) They are included in this directory. - The Timer2 overflow interrupt is used for Timer Tick. If you want to change that, modify os_cpu_c.c and os_cpu_a.s - I have tested this using ATMega103 with and without external RAM using AVR Studio simulator. See test1.c test program. Both Code Compressed (PRO) and STD versions have been tested. -UCOS/II for ICCAVR- The version of UCOS/II is 2.04-the original port was done by Ole Saethe r for the IAR compiler. Jens E. Holtegaard porte d one version using ICCAVR. Joerg Meyer did anot her port (using Jens port as a start). This is bas ically Joerg's port plus a little bit of changes a nd documentation by me.- YOU MUST DOWNLOAD THE M AIN PART OF THE UCOS/FROM THE UCOS II/II WEBSITE http :// www.ucos- ii.com. The supplied project file assumes the portable source is in the .. \ source directory.- Joerg couple has written document showing the stack frames etc.. but it is in German :-) They are included in this directory.- The Ti mer2 overflow interrupt is used for Timer tick. If you want to change that. modify os_cpu_c.c and os_cpu_a.s- I have teste d this using ATMeg
Platform: | Size: 200704 | Author: zhjol | Hits:

[VC/MFChla

Description: HLA程序设计,有关hla\rti编程 的书籍-HLA program design, the programming hla ti books
Platform: | Size: 9904128 | Author: zhanghao | Hits:

[SCMpid

Description: *** **增量式PID控制算法程序*********** T、TD、TI、KP依次从30H,33H,36H,39H开始。 A,B,C的值依次存在BLOCK1,BLOCK2,BLOCK3的地址里 这里R(k)给的是定值 -***** Incremental PID control algorithm procedures*********** T, TD, TI, KP followed from 30H, 33H, 36H, 39H began. A, B, C followed by the existence of the value of BLOCK1, BLOCK2, BLOCK3 address here in R (k) is set to value
Platform: | Size: 5120 | Author: w33839834 | Hits:

[ARM-PowerPC-ColdFire-MIPSCC2430Schematicdiagram

Description: CC2430是TI公司的一款功能强大的zigbee产品,能够组建多种类型的网络,芯片上集成了32位高性能MCU.本文档是该芯片的详细文档,对二次开发和自定义的研发具有现实价值.-TI s CC2430 is a powerful zigbee products, to the formation of multiple types of networks, the chip 32-bit high performance MCU. This document is a detailed documentation of the chip on the second development and custom R & D with practical value.
Platform: | Size: 51200 | Author: ma fengxian | Hits:

[SCMIAR

Description: AVR(R) IAR Embedded Workbench(R) IDE用户手册的这部分包括以下章节: 创建一个应用工程; 使用 IAR C-SPY调试器进行调试; C 与汇编语言模块混合; 使用 C++; 模拟一个中断; 使用库模块;-IT S A good book ti s about IAR study. AVR(R) IAR Embedded Workbench(R) ID
Platform: | Size: 6133760 | Author: 王一凡 | Hits:

[DSP program281X_Boot_ROM_Reference_Guide

Description: TI公司DSP Boot ROM Reference Guide,内含TMS320x281x的Boot ROM的源码,并有中文以及英文boot rom 流程介绍,对于使用BOOT ROM的dsp新手有很大的帮助-TI company DSP Boot ROM Reference Guide, containing TMS320x281x the source of the Boot ROM with Chinese and English boot rom process, the BOOT ROM for the use of the dsp of great help to novice
Platform: | Size: 2443264 | Author: 曹否 | Hits:

[Graph program2

Description: 摘   要:根据高维混沌系统具有更高安全性的特点 ,提出一种基于统一混沌系统和广义猫映射的 彩色图像加密新算法。该算法先利用广义猫映射分别实现空域彩色图像三基色置乱变换 ,然后由统 一混沌系统输出的三维混沌序列分别实现空域彩色图像三基色逐像素替代变换。研究结果表明 ,该 算法具有良好的像素值混淆、 扩散性能和较大的抵抗强力攻击的密钥空间 ,加密图像像素值具有类随 机均匀分布特性 ,且相邻像素的值具有零相关特性 ,证明了所提出方案具有较高的安全性-Abstract: According t o the characteristic of higher secrecy of high2 di mensi on chaotic system, a new col our i mage encryp ti on algorithm based on unified chaotic system and general cat map s was p r oposed . Firstly, tricol or scrambling transformati on was realized respectively in s pace domain by using the general cat map s . Then the three chaotic sequences of unified chaotic system were adop ted t o realize the tricol or Substituti on transformati on p ixel by p ixel . The results demonstrate that the algorithm has good p roperties of confusi on and diffusi on . The key space is large enough t o resist the brute2 force attack . For the encryp ted i mage the distributi on of p ixel2 values has a random2like behavi or and the values of adjacent p ixels satisfy zero correlati on, showing that the p r oposed scheme is of high security . Key words: col our i mage encryp ti on unified chaotic system general catmap tricol or scrambling
Platform: | Size: 567296 | Author: ff | Hits:

[DSP programRF5setup

Description:
Platform: | Size: 1124352 | Author: 睢小龙 | Hits:

[OtherLEACH

Description: 关于无线传感器网络的路由算法研究,在能量均衡上的经典LEACH算法,用matlab进行的仿真,能够实现!-Abstract: The distributed wireless sensor net work and the technol ogy of wireless communicati on could realize the subsidence monit oring and measuring in coalmine goaf . One of the i mportant researcheswas r outing p r ot ocol in wireless sens or net works . Based on the design idea of the LEACH routing p r ot ocol for the wireless sens or net work, taking the net work communicati on capacity t o be increased and the re2 dundant data trans missi on t o be reduced as the target, according t o the available LEACH i mp r oved calculati on method, an i mp roved layer r outing p rot ocol algorithm was p rovided . With the introducti on of the forced cluster head and according t o the data relativity of the monit o2 ring and measuring variati on for the unit p itch pointswithin the continued ti me, the redundant data transmissi on quantitywas reduced . A comparison si mulati on on the net work existing ti me of the i mp roved algorithm for the t wo LEACH p rot ocolswas conduced . The
Platform: | Size: 2048 | Author: 李博宁 | Hits:

[Software EngineeringEarth-center-ed-FiX-Coordi-nateSECF

Description: 此文档是摘要 针对预警卫星测量方程的非线性 利用传统方法 如EKF 不可避免地会带来线 性化误差.该文提出了几何定位 卡尔曼滤波 GL - KF 方法 在主动段弹道位于过地心 平面的假设下 根据2 颗卫星的角度测量解算出导弹位置 将测量方程转化为线性模-The t r adi ti onal met hod EKF Woul d 1ri ng a1out t he li neari Zati on err or of t he meaSur e ment eGuati on . BaSed on t he aSSu mpti on t hat t he t r aJ ec- t or y i n 1ooSt phaSe i S i n a pl ane vi a t he eart h S cor e a GL- KF Geomet r y Lo- cati on and F il t er met hod i S pr eSent ed . W i t h t hi S aSSu mpti on t he m i SSil e poSi- ti on WaS cal cul at ed on t he 1aSi S of t he Sat elli t e angl e o1Ser vati onS and t hen t he nonli near meaSur e ment eGuati on i S t r anSf or med i nt o t he li near eGuati on Whi ch r educed t he li neari Zati on er r or of meaSur e ment eGuati on .
Platform: | Size: 167936 | Author: zhanglong | Hits:

[e-languageCPAtuiangguang

Description: 非cpa日赚50以上不作弊 这是CPA推广注册软件源码到时候用E语言把地址改成你的就可以用了如果肯推的话一天很多。-非cpa日赚50以上不作弊 这是CPA推广注册软件源码到时候用E语言把地址改成你的就可以用了如果肯推的话一天很多 请键入文字或网站地址,或者上传文档。 取消 Fēi cpa rì zhuàn 50 yǐshàng bù zuòbì zhè shì CPA tuīguǎng zhùcè ruǎnjiàn yuánmǎ dào shíhou yòng E yǔyán bǎ dìzhǐ gǎi chéng nǐ de jiù kěyǐ yòng liǎo rúguǒ kěn tuī dehuà yītiān hěnduō “”的用法示例:由 Google 自动翻译英语中文(简体)日语Non-cpa earn 50 not cheating CPA promotion registration software source code to when E language changed to the address you can use if you are willing to push day many
Platform: | Size: 14596096 | Author: lijin | Hits:

[WaveletCurvatureEstimation

Description: This function calculates the curvature of a 2D line. Reference£oS. Hermann and R. Klette. Multigrid analysis of curvature estimators. Proc. Image Vision Computing New Zealand, 108¨C112, 2003. by Jianfei Pang k = CurvatureEstimation(list,b,f) inputs, list : A M x 2 list of line points. fn: The number of forward points that were chosen to calcute. bn: The number of backward points that were chosen to calcute. outputs, Ei : M x 1 Curvature values thetai:M x 1 angle values Example [Ei,ti]=CurvatureEstimation(test,4,4) - This function calculates the curvature of a 2D line. Reference£oS. Hermann and R. Klette. Multigrid analysis of curvature estimators. Proc. Image Vision Computing New Zealand, 108¨C112, 2003. by Jianfei Pang k = CurvatureEstimation(list,b,f) inputs, list : A M x 2 list of line points. fn: The number of forward points that were chosen to calcute. bn: The number of backward points that were chosen to calcute. outputs, Ei : M x 1 Curvature values thetai:M x 1 angle values Example [Ei,ti]=CurvatureEstimation(test,4,4)
Platform: | Size: 2048 | Author: Daniela | Hits:

[Other Embeded programCC1310-master

Description: ti单芯片soc无线射频芯片,性能强大,可用于subg,2.4G都可。实现了接收,发送及跳频r的无线收发。其所用easylink框架也非常值得参考(Ti single chip SOC radio frequency chip, powerful performance, can be used for subg, 2.4G can. Wireless transceiver for receiving, transmitting and frequency hopping R is realized. Its use of the easylink framework is also very valuable)
Platform: | Size: 8723456 | Author: ashang126 | Hits:
« 12 »

CodeBus www.codebus.net