User Profile

Collapse

Profile Sidebar

Collapse
honey777
honey777
Last Activity: Nov 6 '08, 06:35 PM
Joined: Nov 6 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • honey777
    replied to 15 puzzle
    in C
    the skeleton code for my 15 puzzle question

    #include <stdio.h>
    #include <time.h>

    #define MAX_FILE_LENGTH 30
    #define PUZZLE_SIDE 4
    #define EMPTY_SLOT 0

    void loadPuzzle(int puzzle[][PUZZLE_SIDE], FILE *fin);
    int getMove();
    void printPuzzle(int puzzle[][PUZZLE_SIDE]);
    int doMove(int puzzle[][PUZZLE_SIDE], int move);
    void swap(int *a, int *b);...
    See more | Go to post

    Leave a comment:


  • honey777
    started a topic 15 puzzle
    in C

    15 puzzle

    Problem: 15 Puzzle
    This is a common puzzle with a 4x4 playing space with 15 tiles, numbered 1 through 15. One "spot" is always left blank. Here is an example of the puzzle:




    The goal is to get the tiles in order, 1 through 15, from left to right, top to bottom, by just sliding tiles into the empty square. In this configuration, the goal would be to get the 14 and 15 to switch places, without...
    See more | Go to post
No activity results to display
Show More
Working...