All pastes #775213 Raw Edit

Stuff

public cpp v1 · immutable
·published 2007-11-15 14:54 UTC
rendered paste body
#include "sikidomok.h"#include <math.h>using namespace std;//---Kor::Kor(int _x, int _y, int _sugar){    x=_x;    y=_y;    sugar=_sugar;}bool Kor::Tartalmaz(int _x, int _y){    if(sqrt((_x-x)^2+(_y-y)^2)<=sugar)    {        return true;    }    return false;}//---//---Negyzet::Negyzet(int _x, int _y, int _oldalhossz){    x=_x;    y=_y;    oldalhossz=_oldalhossz;}bool Negyzet::Tartalmaz(int _x, int _y){    if(((x-oldalhossz/2)<=_x) && ((x+oldalhossz/2)>=_x) && ((y-oldalhossz/2)<=_y) && ((y+oldalhossz/2)>=_y))    {        return true;    }    return false;}//---//---bool Otszog::Tartalmaz(int _x, int _y){    return true;}//---//---bool Hatszog::Tartalmaz(int _x, int _y){    return true;}//---