Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include"Move.h"
- using namespace std;
- Move::Move(double a,double b)
- {
- x = a;
- y = b;
- }
- void Move::showmove() const
- {
- cout<<"현재 댕댕이는 [x:"<<x<<"/y:"<<y<<"]에 있어요."<<endl;
- }
- Move Move::Move_add(const Move & m) const
- {
- Move dog;
- cout<<"댕댕이는 [x:"<<m.x<<"/y:"<<m.y<<"]로 달립니다."<<endl;
- dog.x+=m.x;
- dog.y+=m.y;
- return dog;
- }
- void Move::reset(double a,double b)
- {
- x = a;
- y = b;
- cout<<"댕댕이가 [x:"<<x<<"/y:"<<y<<"]에있는 주인의 곁으로 달립나다."<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement