Skip to main content

Questions tagged [illegalmove]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

PSET3: Every move is ilegal, no matter what

I'm currently working on the move function that's in the game of fifteen and every single move is illegal even though my logic seems correct (at least to me), but it keeps outputting illegal move and ...
Dominik Clemente's user avatar
0 votes
2 answers

Check50, Game of Fifteen. Timed out while waiting for "Illegal move"

I've finished working on my pset3 game of fifteen. After consulting Check50, it keeps telling me that: timed out while waiting for "Illegal move." Can someone explain this to me? Don't know what to do....
Hubert's user avatar
  • 1
0 votes
1 answer

PSET3 'Illegal Move" coming up for legal moves as well! Almost done!

I have finished with Pset3 except for a tiny little bug. every move is somehow an Illegal Move. here's my code. bool move(int tile) { // TODO // find location of specified tile using linear search ...
Ubuntu NutCracker's user avatar
0 votes
1 answer

Pset3 Move Function "Illegal Move"

my code is notifying me with "Illegal Move" every time I test it. I was wondering if someone can help figure out what is wrong with my code? bool move(int tile) { // TODO int i, j; int swap; //rows ...
CakeWalkCode's user avatar
0 votes
1 answer

Game of fifteen is is somewhat randomly printing extra lines of numbers and deeming moves illegal

Game of fifteen is 1) printing an extra line each time a move is labeled illegal and 2) somewhat randomly labeling moves illegal (e.g. it will swap to the left once but not twice, and up/down etc. ...
A. Durk's user avatar
0 votes
1 answer

Pset3 (Game of Fifteen): The tiles won't swap... ("Illegal move")

I have an issue with my code in Game of Fifteen. I get "illegal move" when I try to swap the tiles, even if it's a "legal" tile. I tried everything but I really don't understand what's wrong. Does ...
Manon H's user avatar
1 vote
1 answer

PSET 3 can't get move to swap tile above blank

Keep getting illegal move on following code and can't figure out why it won't swap. I am selecting the tile above the blank in testing. /** * Prints the board in its current state. */ void draw(...
BoBbY's user avatar
  • 25
0 votes
1 answer

Pset3 Fifteen: "move" moves only once

My "move" function lets me make one move. After that, anything I do is illegal. This is my code: bool move(int tile) { int a = d - 1; int b = d - 1; for (int i = 0; i < d; i++) { for (int j ...
randomshiners's user avatar
0 votes
1 answer

Every move I do in CS50: pset3 is illegal...does anyone know why?

Hi please see code on this link: Every move is illegal and I don't know why... Thanks
i'i'i'i'i'i'i'i'i'i's user avatar
0 votes
1 answer

PSET3 move() keeps showing "illegal move"

I am trying to make the moves happen. So far, the board shows correctly, with the 2 and 1 swapped if odd "d" is provided. But when I type any number at "Title to move:" it just keeps saying "Illegal ...
Lele's user avatar
  • 67
0 votes
1 answer

Pset3 fifteen - move: Tiles wont switch, "illegal move" error even when valid

I have been trying to get the tiles of the move function to switch if any adjacent cells are blank. The initiation and draw functions work fine, I just need to get the move function to make the actual ...
Kgotso Koete's user avatar
0 votes
1 answer

PSET 3 - Fifteen - Move Function Not Working - Brain melted and not sure how to proceed. Please help

so I've been stuck on this darn 'move' function for about a week now, and at this point I'm not sure how to move forward with things. At this point, whenever I make a move, I get "Illegal Move". ...
Manuel Stoilov's user avatar
0 votes
2 answers

pset3 fifteen.c Illegal move after almost solving it!

Question: What causes this error?! Terminal Output when running those 2 commands, Always stuck to almost solving them, then Illegal move ./fifteen 3 < ~cs50/pset3/3x3.txt ./fifteen 4 < ~cs50/...
Kazaky's user avatar
  • 3