[ create a new paste ] login | about

Link: http://codepad.org/82nvdbcb    [ raw code | fork ]

C++, pasted on May 7:
int uj = 0, szamlalo = 0;

        for (;;) {

            usleep(10*1000);
            
            uj = thisclient->bl.get_time ();
            if(uj > szamlalo)
            {
			szamlalo = uj;
            std::cout<<thisclient->bl.get_time ();

			if (thisclient->bl.get_see_ball ()) {
				if (std::abs (thisclient->bl.get_ball_ang ()) > 5.0) {
					std::snprintf (buf, 20, "(turn %d)", (int) thisclient->bl.get_ball_ang ());
					thisclient->sndCmd (buf);
					std::cout << " - Szog: " << thisclient->bl.get_ball_ang();
				}
			}
			else {
				thisclient->sndCmd ("(turn 10)");
				std::cout<<" - HolALabda?";
				}
			std::cout << "\n";
			
			}
          }


Create a new paste based on this one


Comments: