1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
#include <iostream>
using namespace std;
class RulesClass{}
class BoardClass{}
class ShipsClass{}
void SetUpRules(RulesClass*Rules)
void SetUpFleet(RulesClass*Rules,BoardClass*Board,ShipsClass*Fleet);
void Bomb(RulesClass*Rules,BoardClass*Board,ShipsClass*Fleet);
void NextRound(*ObjectArray); //just guessing how to implement here
int main(){
RulesClass Rules;
BoardClass BoardA[2] = {
BoardClass(BoardSize,NoShips),
BoardClass(BoardSize,NoShips),
};
ShipsClass Fleet;
SetUpRules(&Rules);
SetUpFleet(&Rules,(&BoardA)[2],&Fleet);
Bomb(&Rules,(&BoardA)[2],&Fleet);
/*and so on...
I don't know the proper implementation so I'm just guessing below =)
I would like to implimented something like this */
ObjectArray[4]{&Rules,&BoardA)[2],&Fleet};
NextRound(&ObjectArray)
}
|