/SwiftFinal

This is my final project for swift.

SwiftFinal

This is my final project for swift. For this Project I decided to make a puzzle application for the IPhone. I programmed each puzzle to randomly position each piece of the puzzle every time it is opened, that way it is a unique experience every time it is played. The user will be able to choose the size of the puzzle. There are three by three with nine pieces, four by four with sixteen pieces, and five by five with 25 pieces. The pieces will be randomly arranged on a play field that is 360 pixels wide as well as tall. The last piece will be hidden, creating a blank space. Only a piece adjacent to a blank space will be able to be moved, and that piece may only be moved into the blank space. When all the visible pieces are in their proper location the last piece will appear, allowing the user to view the entire picture. With the rules of movement there are a set of guidelines that determine if a puzzle is solvable or not. During the random generation, the orientation will be checked against a specific algorithm to determine solvability, if the randomly generated puzzle is not solvable it randomly generates a new board, and continues to do so until it is solvable, to ensure a more pleasant experience for the user. I have played several randomly generated game apps that do not filter out unsolvable initial setups, and I personally find this to be very frustrating and not enjoyable. For the pictures, I chose to use pictures of my family dogs, past and present. Let’s face it, everyone loves cute animals. By using my own pictures, I will also be able to avoid any copy write conflicts. There are also puzzles with numbered tiles, to give a new user an easier puzzle to figure out a play strategy. Each piece when clicked will have an animated transition where it smoothly slides into the next location.