# Questions tagged [won]

The tag has no usage guidance.

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
63 views

### Error: Make sure game is winnable (fifteen) won

bool won(void) { for(int i= 0; i<d; i++) { for(int j = 0; j <d; j++) { if((i==(d - 1)) && (j==(d -1)) && board[i][j]== 0) { if(board[i][j] <...
56 views

### pset3 game of fifteen won() function does not work

Just in case, I'll put the code of the other functions, but they, like, are successfully tested. void init(void) { int value = d*d - 1, c; for(int i = 0; i < d; i++) { for(int ...
30 views

### Pset3_Fifteen_Won()

bool won(void) { // TODO for(int r=0;r<d;r++) { for(int c=0;c<d;c++) { if(c==r==(d-1)) { if(board[r][c] != 0) { return true; ...
• 11
50 views

### Pset3, Game of Fifteen, won, game keeps winning!

for the final part of fifteen, my game wins automatically upon start up and I'm not sure why, please help, thanks. my code is as follows: bool won(void) { //for each row for (int i = 0; i < d; ...
89 views

### Fifteen won returning ftw

Can anyone tell me why the code doesn't work as I had expected ? It keeps returning ftw even if it's not.
351 views

### Won function of pset3 game of fifteen making error

My code is not able to compile clang is stating error in won function. My code is as follows: /** * fifteen.c * * Computer Science 50 * Problem Set 3 * * Implements Game of Fifteen (...
75 views

### My won function is not working. I am getting the following checks. https://sandbox.cs50.net/checks/6ca6c632ceb0408aaac04be0ed215bfe

/** * fifteen.c * * Computer Science 50 * Problem Set 3 * * Implements Game of Fifteen (generalized to d x d). * * Usage: fifteen d * * whereby the board's dimensions are to be d x d, * ...
122 views

### Move function not working in Game of Fifteen

I cant seem to find the bug why my move function is not working for me, any help would be much appreciated bool won(void) { int counter = 0; // loop for rows to start from one position left ...