sanghai45 0 Unverified User

I am trying to implement program in modular way or you can say that OOPS way .. This is begining so wish to get help to implement it

My problem is I can think of modules but then I am not able to convert it in to coding

Firstly I have habit of writing hardcode positions value so I thought of reading it from xml/text files. I have classes that reads the text file .. but now how to use it in modular way I need help in that

What my idea is ,

I have GamePlay class where I want to do everything loading level , creating elements .. So while creating elements I need positions which I thought to get it from Class name LevelElements

Now this is my paper work but how do I put it in to coding

I guess I have to make singleton for the class GamePlay so all the member variables of gamePlay can be access in LevelElements class where I have to read all the position by calling functions in class ReadFile.cpp

Now can anyone please give me the basic structure of this idea it will be very helpful...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.