Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- moveGen(Coordinate start,int deltaX, int deltaY){
- int x=start+deltaX;
- int y=start+deltaY;
- if(Coordinate(x,y) is occupied by friend){
- stop.
- }else if(Coordinate(x,y) is free){
- add move
- moveGen(Coordinate(x,y),deltaX,deltaY)
- }else{ //if coordinate(x,y) is occupied by foe
- add move
- }
- }
Add Comment
Please, Sign In to add comment