How to get started (Concept)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fowle040
    New Member
    • Sep 2006
    • 14

    How to get started (Concept)

    1. what classes will I need?
    2. what private attributes and methods should I include?
    3. I need to use the Character concept along with some additional ideas to implement the following main........... .
    HELP!!!!!!!!!!! !!!


    int main( ) {

    Game g1( parameters );
    Character p1( parameters ), p2( parameters );
    Venue forest( parameters );

    g1.setLevel(5);

    g1.setPlayerOne (p1);
    g1.setPlayerTwo (p2);

    g1.setLocation( forest);

    meet(g1.PlayerO ne, g1.PlayerTwo);

    cout << g1.PlayerOne << g1.PlayerTwo << endl;

    g1.teraform( 50);

    cout << g1.Location << endl;

    int s = g1.PlayerOne.ge tStrength( );
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Originally posted by fowle040
    1. what classes will I need?
    2. what private attributes and methods should I include?
    3. I need to use the Character concept along with some additional ideas to implement the following main........... .
    How on earth would we know, you have not told us what you are trying to achieve or where you got that code from. If you wrote it yourself then you should know what classes/methods you will need since you have used them and therefore decided on what you want to do.

    Comment

    • rgb
      New Member
      • Aug 2006
      • 37

      #3
      Originally posted by fowle040
      1. what classes will I need?
      2. what private attributes and methods should I include?
      3. I need to use the Character concept along with some additional ideas to implement the following main........... .
      HELP!!!!!!!!!!! !!!


      int main( ) {

      Game g1( parameters );
      Character p1( parameters ), p2( parameters );
      Venue forest( parameters );

      g1.setLevel(5);

      g1.setPlayerOne (p1);
      g1.setPlayerTwo (p2);

      g1.setLocation( forest);

      meet(g1.PlayerO ne, g1.PlayerTwo);

      cout << g1.PlayerOne << g1.PlayerTwo << endl;

      g1.teraform( 50);

      cout << g1.Location << endl;

      int s = g1.PlayerOne.ge tStrength( );
      It looks like you are trying to create some type of game, so you must define your own classes and program your functions to the behavior you expect. so i would guess that Game class will have some variables (or reference) for Character class as well as Venue class. The Character class would probably have some characteristic (or information) of each player, maybe you want to keep track of score, player name, etc.. The Venue class would probably be the field of the game itself, so there may be grid information to unique to one another.

      Comment

      • fowle040
        New Member
        • Sep 2006
        • 14

        #4
        Originally posted by Banfa
        How on earth would we know, you have not told us what you are trying to achieve or where you got that code from. If you wrote it yourself then you should know what classes/methods you will need since you have used them and therefore decided on what you want to do.

        I am trying to create a game. I will send my updated info in a second. Please let me know about the format, wheter or not it is correct.

        Comment

        • fowle040
          New Member
          • Sep 2006
          • 14

          #5
          game

          int main( ) {

          Game g1( parameters );
          Character p1( parameters ), p2( parameters );
          Venue forest( parameters );

          g1.setLevel(5);

          g1.setPlayerOne (p1);
          g1.setPlayerTwo (p2);

          g1.setLocation( forest);

          meet(g1.PlayerO ne, g1.PlayerTwo);

          cout << g1.PlayerOne << g1.PlayerTwo << endl;

          g1.teraform( 50);

          cout << g1.Location << endl;

          int s = g1.PlayerOne.ge tStrength( );



          Here is the data I have. I need to know if the format is correct, which I already know is not. I need to know the format and if you could provide me with the concept of doing it that way. Thank you sooooooooo much for your help!

          #include <iostream>
          #include "character. h"
          #include "game.h"
          #include "venue.h"

          #ifndef game
          #define game
          #ifndef character
          #define character
          #ifndef venue
          #define venue



          Class Game{
          Character (player one);
          Character (player two);
          Venue (location);
          Int (level, energy, strength, teraform);

          Class Character () {
          Character ( strength);
          Character (player one, player two);

          Class Venue ();
          Venue (location);
          Venue (teraform);
          Venue (player one, player two);
          private:
          string location, player one, player two
          int strength, energy, level, teraform

          public:
          Game ();
          Game (player one, player two)
          Game (const game);


          Character ();
          Character (player one, player two)
          Character (const character);

          Venue();
          Venue (location)
          Venue (teraform)
          Venue (const forest);

          void setCharacter (string);
          void setVenue (string);
          void setLocation (string);
          void setStrength (int);
          void setEnergy (int);
          void setLevel (int);
          void set Teraform (int);


          string getCharacter () const;
          string getVenue () const;
          string getLocation () const;

          int getStrength () const;
          int getEnergy () const;
          int getLevel () const;
          int getTeraform () const;

          void addStrength (int);
          void addEnergy (int);
          void addLevel (int);
          void addTeraform (int);
          void looseStrength (int);
          void looseEnergy (int);
          void looseLevel (int);
          void loose Teraform (int);

          void print ();

          Comment

          • Niheel
            Recognized Expert Moderator Top Contributor
            • Jul 2005
            • 2433

            #6
            Post more details on what you need help with. It's really vague.
            niheel @ bytes

            Comment

            • Banfa
              Recognized Expert Expert
              • Feb 2006
              • 9067

              #7
              Please don't double post, keep items related to 1 topic in a single thread.


              "I need to know the format"

              The format of what?

              As KUB said really vague, ask a specific question and we can give you a specific answer. Ask a vague question and the best we could give you is a vague answer.

              Comment

              Working...