Sorry to bump, but im really running short on time and I'm SO close to finishing! If anyone can help me out soon, that would be amazing.
Code so far:
#include <stdio.h>#include <string.h>
...
Type: Posts; User: ADH94
Sorry to bump, but im really running short on time and I'm SO close to finishing! If anyone can help me out soon, that would be amazing.
Code so far:
#include <stdio.h>#include <string.h>
...
I wanted to try something like that initially, but I was getting too snarled up with everything screwing up the rest of the program.
I just have guess as a character and not a string. Should I...
In regards to those first lines, it definitely seems to be backwards now, but now im not sure how to throw in the "else wrong" bit.
And I slapped a static on the display just to try it out, and...
Back the front? I'm afraid I dont understand.
Yeah thats what I did, worry not!
But if anyone can offer any assistance to me, it is still needed and greatly appreciated!
Well that is entirely useless. Anyone else?
Ok so I have the initial dash print thing working properly and rearranged it to be at the top of the function so it actually looks like it should be there (purely for my own preference). Now I am...
Crap I was focusing on the other things he said to me.. Totally missed that. And I fixed the scanf bit too, thanks.
I'm going to try and resolve a few little problems right now and then I'll pick...
Well I did ask about static variables earlier but no response.. But I added it in now, thanks. Now you said that each possible result needs there to be a return value right? The only return value I...
Ok the new slightly less mistake-filled function..
#include <stdio.h>#include <string.h>
int draw_guess(int length, char guess, char word[]) //the function draws the unguessed letters...
Gah i totally knew that! I keep making such stupid mistakes.. Thanks for that one
I also just fixed a bunch of little errors like a missing } and forgetting a number... so dont worry about those...
I need it to be a string though..
Ok so I've done some tinkering and most of the issues lie in the draw function. Here's what i've done.. sorry if it offends your expert eyes haha
#include <stdio.h>#include <string.h>
int...
They demonstrated and it worked fine.. Unless it should be declared as dashes[7] (since there can only be 6 dashes maximum) and my mind conveniently swapped that out with "i"
Our TA's showed us this exactly. The value of i is in the for loop im pretty sure.
Yeah I just realized that.. So the variable resets each time the function is used? I added that last bit in...
Hi, a while ago I posted here for help on an assignment for school, and the help I received was invaluable and helped me figure out how to complete my assignment!
This is my final assignment now,...
So im going to assume that the pointer variables will be the rows. Do i designate the variable in the main function with the * and the point back in my play function with the row_# = row_# - rocknum?...
As dumbed down as that was (thanks haha) I still am having difficulty figuring out what ta do! It's also due tonight at midnight (I've been so damn busy with work and midterms that I've had to cram...
Ok so i've tried reading about pointers and I'm having difficulty understanding the concept of it. Is there a way I could use the row_# variables I initially declare and in the play function I...
Alright, will do. I was under the impression though that since draw_nim gets its variables from play_nim which gets ITS variables from main, that if I changed the variable's value in main it would...
Ok thanks, that completely got rid of the doubles! Now to make the drawing pick up from where the last player changed it without resetting!
Revised code:
#include <stdio.h>
void draw_nim(int row_1, int row_2, int row_3) //function draws the gameboard
{
//Each of the following take the inputted row value and proceeds to...
I need to show the board before the players start making changes though, that's why that line is there. And I'm fairly certain it is outside of main loop, yet the double drawing occurs during the...
Ah thanks so much! That solves problem 2! That one was frustrating me the most.
I wrote most of the program on linux and it never had the first problem (repeating the draw function twice before...
Well that partially takes care of the player problem! But when I play it goes:
Player 1
(player 1 does stuff)
Player 2
(player 2 does stuff)
Player 2 AGAIN
back to player 1