#ifndef _KLOTSKI_H #define _KLOTSKI_H_ #include #include #include #include #include #include "grid.h" #include "piece.h" using std::vector; using std::queue; extern string err_msg[4]; extern string piece_tag[]; /* check if Z piece spans last column */ bool checkSoln(Grid); /* validate piece */ int checkPiece(int, int, Piece); /* take in a grid and return a string representation of it */ string *fillBoard(Grid); /* take 1D grid, create 1D representation of it, and print it */ void printGrid(Grid); /* load grid from a file */ Grid loadGrid(char **); /* can piece move to left? If so, have many spaces */ int canMoveLeft(string [], int, int, Piece); /* can piece move to right? If so, have many spaces */ int canMoveRight(string [], int, int, Piece); /* can piece move up? If so, have many spaces */ int canMoveUp(string [], int, int, Piece); /* can piece move down? If so, have many spaces */ int canMoveDown(string [], int, int, Piece); /* fill in a queue with grids to be checked */ int possibleMoves(Grid, queue &); #endif