Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Engine
- {
- protected:
- matrix<short> board;
- bool front,side;
- short x1,x2,y1,y2;
- public:
- static const short RIGHT = 1;
- static const short FRONT = 2;
- static const short LEFT = 3;
- static const short BACK = 4;
- void loadMap(string s)
- {
- Mapper m;
- board = m.getMapFromFile(s);
- x1 = m.getRowStartPosition();
- y1 = m.getColumnStartPosition();
- };
- matrix<short> checkMoveResult(short direction)
- {
- matrix<short> response(1,3);
- switch(direction)
- {
- case RIGHT:
- if(front && side){}else
- if(front && !side){}else
- if(!front && side){}else
- if(!front && !side){}
- case LEFT:
- if(front && side){}else
- if(front && !side){}else
- if(!front && side){}else
- if(!front && !side){}
- case FRONT:
- if(front && side){}else
- if(front && !side){}else
- if(!front && side){}else
- if(!front && !side){}
- case BACK:
- if(front && side){}else
- if(front && !side){}else
- if(!front && side){}else
- if(!front && !side){}
- }
- return response;
- };
- };
Add Comment
Please, Sign In to add comment