Please help!!!

Hi!

I'm a high school student and I'm taking a C++ course now. For my final project, I have to implement a game using C++. A friend told me to implement boggle game, but I don't know exactly how this game is played.

What kind of class should I use? (how should I write it?) I was told to use apcetor, but, what is it? Can someone help me?

Thank you very much.




Comments

  • if you can help me

    send it to Miguelang@yahoo.com


    thanx




  • : Hi!

    : I'm a high school student and I'm taking a C++ course now. For my final project, I have to implement a game using C++. A friend told me to implement boggle game, but I don't know exactly how this game is played.

    : What kind of class should I use? (how should I write it?) I was told to use apcetor, but, what is it? Can someone help me?

    : Thank you very much.


    Well I don't know how to play "boggle" but I've found that classes aren't very good for making games with, at least simple games.


    Here's some code for a simple way to move a guy around the screen, please do not use this as your "game" but more of a reference as to how you could implement one:



    #include stdio.h

    #include conio.h
    // You need conio.h to use any colors and keyboard input.

    // cprintf(); is used to print out characters with color.

    // Just look up the syntax.
    // This program will work with most DOS compilers. This program works

    // fine under TC++ and DJGPP.
    #define UP 72 // Characters the arrow keys return from keyboard.

    #define DOWN 80

    #define LEFT 75

    #define RIGHT 77


    int main () {

    char c;

    int x,y, sizex=20, sizey=10; //sizex and sizey is the size of the "arena" the guy walks around in (his max area he can walk in).
    textcolor(15);

    textbackground(0);

    clrscr();

    // Change background color to 0 (black), and clear screen.
    textbackground(1);

    // Change background color to 1 (blue)
    // This for statement draws an arena sizex X sizey in the upper left corner of screen.

    for (y=0; y 1)) y--; //If keyboard returns UP and if the Guy (the smiley) CAN go up (as in he must stay in the arena).

    if ((c==DOWN) && (y 1)) x--;

    if ((c==RIGHT) && (x < sizex)) x++;

    }
    cprintf(" "); //Erases the guy (so he doesn't leave a trail).


    }

    return 0;

    }


    -Xotor-




  • why do you need one?


    By the way nobody is going to writ ea complete

    editor for you!!!


    this should get help you started


    for example:

    FILE *ptf = fopen(etc...

    // watch your library for the function fopen

    char ch

    int t=0,i

    int y1=0, y2= 22


    1. open file // look in your library for

    the function fopen


    2. while not eof(pnf) // while not eof file

    3. scanf(phrase[t])

    4. t++


    5. while ch!=27 //while not Esc

    6 ch=getch() //wait until keypressed and

    save

    7 clrscr()

    8 switch(ch)

    case 72 : y1--; y2--; // if up change

    values

    if (y1t)

    y1--

    y2--


    break


    //--- put text on screen -------


    9 for (i=y1;i<=y2;i++) <br>
    printf("%s","
    ",phrase[t])






Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories