• Create Account

Banner advertising on our site currently available from just \$5!

### #ActualKotoReZ

Posted 29 April 2013 - 11:45 AM

Well basically what I wanted to do is to use all of the concepts I have learned and put them into one program including references/pointers. In this case the reason why I wanted to use pointers(probably a bad one) so when the player does a move I can just incriment the number by calling setPosition from the main() for example: if user presses UP  do player.setPosition(10, 15), UP again player.setPosition(10, 16), RIGHT player.setPosition(11, 16) etc. By puting this values into setPosition, I though it would be easier for my PlayerOn_Board class to talk to Board_level through  PlayerOn_Board::drawPlayer_board function.

### #1KotoReZ

Posted 29 April 2013 - 11:43 AM

Well basically what I wanted to do is to use all of the concepts I have learned and put them into one program including references/pointers. In this case the reason why I wanted to use pointers(probably a bad one) so when the player does a move I can just incriment the number by calling setPosition from the main() for example: if user presses UP  do player.setPosition(10, 15), UP again player.setPosition(10, 16), RIGHT player.setPosition(11, 16) etc. By puting this values into setPosition, I though it would be easier for my PlayerOn_Board class to talk to Board_level through  PlayerOn_Board::drawPlayer_board function.

Essentially the reason why I try to go through all this nonsence is to practice OOP and how all these classes work.

PARTNERS