Question
Using C++ A 3 by 4 sliding puzzle with one tile missing. The objective is to place the tiles in order by making sliding moves
Using C++
A 3 by 4 sliding puzzle with one tile missing. The objective is to place the tiles in order by making sliding moves that use the empty space USING A STAR ALOGRITHIM.
Rules
You are given the initial state of the board and you must output a list of moves to rearrange the tiles.
Each tile is numbered from 1 to 11 (0 is the empty space). The final state is the following:
0 1 2 3 4 5 6 7 8 9 10 11
In order to make a move, you need to print the coordinate of the tile you wish to move and it will take the place of the empty space. The coordinate of a tile is the couple (row, column), with (0, 0) the top-left element.
Should be implementable in codingames 11 puzzle game.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started