Skip to content

A text based game which runs on the terminal written in Bash.

Notifications You must be signed in to change notification settings

NishantKr97/Tiles-Swap-Game

Repository files navigation

Tiles-Swap-Game

The Game of Tiles is a puzzle played on a square, two-dimensional board which can be of dimensions from 3x3 to 9x9 with numbered tiles that slide. The goal of this puzzle is to arrange the board’s tiles from smallest to largest, left to right, top to bottom, with an empty space in board’s bottom-right corner. Sliding any tile that borders the board’s empty space in that space constitutes a "move." Although the configuration above depicts a game already won, notice how the tile numbered 12 or the tile numbered 15 could be slid into the empty space. Tiles may not be moved diagonally, though, or forcibly removed from the board. Although other configurations are possible, we shall assume that this game begins with the board’s tiles in reverse order, from largest to smallest, left to right, top to bottom, with an empty space in the board’s bottom-right corner. If, however, and only if the board contains an odd number of tiles (i.e., the height and width of the board are even), the positions of tiles numbered 1 and 2 must be swapped, as in the below.

The puzzle also has an autocomplete feature available for 3x3 and 4x4 grid. The user will be able to see the sequence in which the puzzle is solved one move at a time from start to the solution of the puzzle. We also store the minimum number of moves and time of highscore for each grid size.

About

A text based game which runs on the terminal written in Bash.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published