Search:

Type: Posts; User: Dylan Metz

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    1,925

    How would the remaining cases look like? I sorta...

    How would the remaining cases look like? I sorta remember my instuctor talking about using either division or modulo(%)?
  2. Replies
    13
    Views
    1,925

    Here is what I have so far: #include...

    Here is what I have so far:

    #include <iostream>#include <string>


    using namespace std;


    //recursive function prototype
    string intToStr(int n);
  3. Replies
    13
    Views
    1,925

    So it would be like this? if(n==0) return 0? ...

    So it would be like this? if(n==0) return 0?

    How would you return it as a string? Also could you also provide some advice on the main function? Would I be using the same main function as I did for...
  4. Replies
    13
    Views
    1,925

    Not sure about static variables. As for intToStr....

    Not sure about static variables. As for intToStr. I haven't started it yet. I would like some help with the base case of the recursive part.
  5. Replies
    13
    Views
    1,925

    We are not allowed to use any functions that are...

    We are not allowed to use any functions that are similar to atoi or itoa. We also cannot use for or while.

    This is my other function that converts the string to an integer:


    int...
  6. Replies
    13
    Views
    1,925

    Need some help on c++ assignment

    I already completed one part of the assignment, but need help on the other part. The assignment was to create two recursive functions. One that converts strings to integers ( which i completed) and...
  7. Shape collision and board matrix in tetris clone c++

    I need help from stopping shapes from going right through other shapes. Someone said I needed a board matrix, but I have no Idea how to set that up.

    Right now I have all movement and roation done...
  8. Replies
    20
    Views
    8,647

    Here is what I am currently trying to do:...

    Here is what I am currently trying to do:
    rotation in shape class:

    void Shape::rot(int x , int y)
    {
    int xp, yp;

    xp=x-y+y; //x-y is pivot points
    yp=x+y-x; //x+y is pivot points
  9. Replies
    20
    Views
    8,647

    Thank-you for all the help in getting me started....

    Thank-you for all the help in getting me started. I have one more question right now. Where to put all the code? Do I make a function or do I add it to a class?
  10. Replies
    20
    Views
    8,647

    My c++ teacher gave a lecture of rotating the...

    My c++ teacher gave a lecture of rotating the pieces. but I am so confuse. I do not know where to put the code or how to call it. Do I put in one of the classes?

    My teacher gave us something like...
  11. Replies
    20
    Views
    8,647

    I said in the last post that I need help getting...

    I said in the last post that I need help getting started with setting up rotation of the shapes. I have no idea how set it up or where to put it.
  12. Replies
    20
    Views
    8,647

    Need help with rotation in Tetris game

    I need help getting started with rotation of shapes in tetris c++ game made with darkGDK.

    Here is the current code:

    //Dark GDK - The Game Creators - www.thegamecreators.com

    //the wizard has...
  13. Okay the movement is working now, but when the...

    Okay the movement is working now, but when the shape hits the side(s) it stops moving.

    code:

    //Dark GDK - The Game Creators - www.thegamecreators.com

    //the wizard has created a very simple...
  14. I fixed the code in post #1. I now having no...

    I fixed the code in post #1. I now having no errors, but it barley recognizes when the left or right key is pressed.
  15. Okay I fixed the error, but now I am having...

    Okay I fixed the error, but now I am having trouble with the code not recognizing when the left or right key is pressed. You need to hold down the key for it to move.

    code:

    //Dark GDK - The...
  16. Need help with movement in tetris c++ game

    I am making a tetris game for my intro c++ class. It is in c++ using Dark GDK.

    I am getting one error:


    1>i:\ school\ spring 2012\comsc-048\tetris code\tetris code\tetris code\tetris\dark gdk...
  17. Replies
    2
    Views
    4,247

    Proplem with TETRIS game in C++

    My intro to c++ class is making a tetris game for a project.

    My code can be found here: [C++] TETRIS C++ -ERRORS- - Pastebin.com

    or here:

    //Dark GDK - The Game Creators -...
  18. Replies
    22
    Views
    21,327

    Okay here how's this: void NextState (char...

    Okay here how's this:

    void NextState (char board[][COLS]){
    char board2[ROWS][COLS];
    //int LiveCnt=0;
    for (int r=1; r<ROWS-1; r++)
    {
    int LiveCnt=0;
    for (int c=1; c<COLS-1; c++)
    {
  19. Replies
    22
    Views
    21,327

    Okay this is what I have so-far: ...

    Okay this is what I have so-far:





    #include <iostream>
    #include <string>
    #include <fstream>
  20. Replies
    22
    Views
    21,327

    I know what I need to do, but this is where I'm...

    I know what I need to do, but this is where I'm stuck. How do you check the neighbors of the LIVE cells. I know you need to use a lot of IF statements, but I really do not know how to get started on...
  21. Replies
    22
    Views
    21,327

    //Game of Life //Dylan #include ...

    //Game of Life
    //Dylan
    #include <iostream>
    #include <string>
    #include <fstream>
    using namespace std;
    //Global Variables
    const int ROWS = 12;
    const int COLS = 30;
    const char LIVE = 'x';...
  22. Replies
    22
    Views
    21,327

    okay I looked it over and compared what you did....

    okay I looked it over and compared what you did. Now I can I print the board to see if it is printing right?

    Here is what i tried with your code:

    //Game of Life
    //Dylan
    #include <iostream>...
  23. Replies
    22
    Views
    21,327

    I will look over the changes you made in more...

    I will look over the changes you made in more detail tomorrow when I am in front of my windows desktop that has dev-c++ on it.

    Thank-you!
  24. Replies
    22
    Views
    21,327

    Okay here is my new code. Is it better? I am also...

    Okay here is my new code. Is it better? I am also now getting[link error]

    code:

    //Game of Life//Dylan


    #include <iostream>
    #include <string>
    #include <fstream>
  25. Replies
    22
    Views
    21,327

    I am not asking anyone to do it for me. but help...

    I am not asking anyone to do it for me. but help me get started on the last part. I do not know how to start and because of budget cuts to my college their is limited resources from the tutors at the...
Results 1 to 25 of 26
Page 1 of 2 1 2