lexuege软件编程吧 关注:6贴子:76
  • 5回复贴,共1

我被吸引过来不科学【给个吧主否】

取消只看楼主收藏回复

不是纯水


IP属地:浙江1楼2014-12-14 19:01回复
    来发布一个弱游戏:鼠标游戏
    具体来说就是双方分别操控左右键狂按,中间滚轮能把双方清零


    IP属地:浙江2楼2014-12-14 19:03
    回复
      不多说了,贴代码


      IP属地:浙江3楼2014-12-14 19:03
      回复
        uses winmouse,graph;
        var a,b,x,y,m,n:longint;gm,gd:integer;s,ss:string;
        begin
        gd:=8;initgraph(gm,gd,'');
        a:=0;b:=0;n:=0;
        settextstyle(1,0,10);
        repeat
        bar(1,1,700,500);
        str(a,s);str(b,ss);
        outtextxy(5,400,s);outtextxy(355,400,ss);
        repeat
        getmousestate(x,y,m);
        until m>0;
        case m of
        1:a:=a+1;
        2:b:=b+1;
        3:begin a:=a+1;b:=b+1;end;
        4:if n<3 then begin n:=n+1;a:=a+b;b:=a-b;a:=a-b;end;
        end;
        repeat
        getmousestate(x,y,m);
        until m=0;
        if a=100 then begin outtextxy(300,100,'LEFT');readln;halt;end;
        if b=100 then begin outtextxy(300,100,'RIGHT');readln;halt;end;
        until false;
        end.


        IP属地:浙江4楼2014-12-14 19:03
        回复
          自顶一次


          IP属地:浙江5楼2014-12-14 19:06
          回复
            险些把这个坑忘了:
            贴代码:uses winmouse,graph;
            var a,b,x,y,m,n:longint;gm,gd:integer;s,ss:string;
            begin
            gd:=8;initgraph(gm,gd,'');
            a:=0;b:=0;n:=0;
            settextstyle(1,0,10);
            repeat
            bar(1,1,700,500);
            str(a,s);str(b,ss);
            outtextxy(5,400,s);outtextxy(355,400,ss);
            repeat
            getmousestate(x,y,m);
            until m>0;
            case m of
            1:a:=a+1;
            2:b:=b+1;
            3:begin a:=a+1;b:=b+1;end;
            4:if n<3 then begin n:=n+1;a:=a+b;b:=a-b;a:=a-b;end;
            end;
            repeat
            getmousestate(x,y,m);
            until m=0;
            if a=100 then begin outtextxy(300,100,'LEFT');readln;halt;end;
            if b=100 then begin outtextxy(300,100,'RIGHT');readln;halt;end;
            until false;
            end.


            IP属地:浙江10楼2015-01-18 18:11
            回复