Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int legalPlayerMove(float moveTo, float moveFrom)
- {
- float moveValue=(moveTo-moveFrom);
- cout<<"trace move value"<<moveValue<<endl;
- if(moveValue==(-1.1))
- cout<<"moved up left"<<endl;
- if(moveValue==(-0.9))
- cout<<"moved up right"<<endl;
- if(moveValue!=-1.1||moveValue!=-.9)
- cout<<"that is not a legal move, please renter the square number you wish to move to."<<endl;
- return 0;
- }
- if(std::numeric_limits<float>::epsilon() + moveValue > 1.1) { // ...
- }
- #define EPS 0.000001
- if(EPS + moveValue > 1.1){..}
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement