Search:

Type: Posts; User: Fredir

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    1,214

    I can do that, but I am not sure how to actually...

    I can do that, but I am not sure how to actually drop the piece until it hits something of the larger jar array.
  2. Replies
    7
    Views
    1,214

    int finalHeight = 0; for( int i = 0; i < 4;...

    int finalHeight = 0;
    for( int i = 0; i < 4; i++)
    {
    for(int j = 3; j > -1; j--)
    {
    if(box[j][i] != 0)
    {
    for(int k = firstRow + j; k < 20; k++)
    {...
  3. Replies
    7
    Views
    1,214

    Basically, I have the small 4 X 4 bool box and...

    Basically, I have the small 4 X 4 bool box and the larger jar 10 X 20, which is also bool. I want to move drop the bo until the block in the box collides with any piece from the jar.

    I tried a...
  4. Replies
    7
    Views
    1,214

    help coming up with loop/algorithm

    I have a 4X4 bool "box" array inside a larger "jar" array and want to write a drop loop so if the user presses a certain key, it will drop the piece (this is for a tetris game) until it hits...
  5. Replies
    15
    Views
    2,574

    Can anyone spot anything wrong with the 'w'...

    Can anyone spot anything wrong with the 'w' (rotation) part???

    Thank you so much.
  6. Replies
    15
    Views
    2,574

    Yes, I am doing something similar.

    Yes, I am doing something similar.
  7. Replies
    15
    Views
    2,574

    Ok, but regarding my last post about the rotation...

    Ok, but regarding my last post about the rotation part, why is it not displaying anything at all on the jar array?
  8. Replies
    15
    Views
    2,574

    Also, I added an new if thing for rotation but it...

    Also, I added an new if thing for rotation but it doesn't seem to be working. I am kind of losing my mind over this right now. If anyone can shed some light on this statement as well, I would highly...
  9. Replies
    15
    Views
    2,574

    Thank you for the help everyone--I decremented...

    Thank you for the help everyone--I decremented the indexes on the down and right shift. Here is the updated code:



    // Practice 2.cpp : Defines the entry point for the console application.
    //
    ...
  10. Replies
    15
    Views
    2,574

    can anyone explain why that makes a difference?

    can anyone explain why that makes a difference?
  11. Replies
    15
    Views
    2,574

    What you mean four loops, the last two are to...

    What you mean four loops, the last two are to delete the line on the top.

    I really don't see how starting from the bottom would matter. Can someone suggest a correction?
  12. Replies
    15
    Views
    2,574

    Program to move box in a jar - what is wrong?

    I am writing this program to move a box in a jar(a larger array). First, I overlap the box into the array, then I print the array and attempt to move it. But for some reason, the moving part of the...
  13. Replies
    16
    Views
    4,940

    Ok, so I would need to ask the user for the...

    Ok, so I would need to ask the user for the number of rows in matrix 1, the number of columns in matrix 2, and the number of elements he will input in each row/col, right?

    - Also, I need to input...
  14. Replies
    16
    Views
    4,940

    thank you so much for the elaborate post. I will...

    thank you so much for the elaborate post. I will see how it goes from here.
    dwks, can you give me a brief example of how to declare such an array? I am assuming we need Y (the number of columns)...
  15. Replies
    16
    Views
    4,940

    I am not sure how the whole col/row thing is...

    I am not sure how the whole col/row thing is being played out in an array, though. I would appreciate if anyone could explain...thanks.
  16. Replies
    16
    Views
    4,940

    I have to input it across--how would I implement...

    I have to input it across--how would I implement the index in this case? I having a hard time visualizing how to set up the indexes...
  17. Replies
    16
    Views
    4,940

    dwks, just a minor question, i would have to...

    dwks, just a minor question, i would have to declare int array to be of a specific size before doing that right?
  18. Replies
    16
    Views
    4,940

    I have to use 1d arrays. I still don't get how it...

    I have to use 1d arrays. I still don't get how it would behave like as the 2 d array above, though--can anyone explain?

    In other words, how would I input data row by row using this index (A[2*j+3]...
  19. Replies
    16
    Views
    4,940

    would this work with a 1 d array as well?

    would this work with a 1 d array as well?
  20. Replies
    16
    Views
    4,940

    Matrix multiplication help

    I have to do a program to multiply two matrices using 1d arrays, but I am not sure how to begin. What would I need to get from the user--the number of rows in the first array and cols in the second...
  21. Replies
    5
    Views
    1,069

    Oh I see, I can have an array with bool box [...

    Oh I see, I can have an array with

    bool box [ X ] [ Y ] = Function ( Boo ); -- Is that what you meant?

    - Sorry, I am just starting out, is there a simple way of doing this?
  22. Replies
    5
    Views
    1,069

    I see, but the function in this case is being...

    I see, but the function in this case is being called by another function, so sending it wouldn't work.

    Is there a way to just return the array without vectors?
  23. Replies
    5
    Views
    1,069

    How do i return an array?

    I have a function that creates a 2d bool array--so the contents are either 0 or 1. Is there any way to return the array or to pass it as a pointer?
  24. Replies
    2
    Views
    840

    The reason I wanted bool is just so I know which...

    The reason I wanted bool is just so I know which spots actually have info inside. SO, if there is a blank space, I would want it to display 0.

    Can anyone suggest a solution for that? as of now, my...
  25. Replies
    2
    Views
    840

    Rotating function for array

    I am trying to make a rotating function for a 4X4 array:

    Here is what I have so far, but I need the array to be a bool functuion that displays some zeros, so far it is only displaying 1s, any...
Results 1 to 25 of 60
Page 1 of 3 1 2 3