943,778 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 693
  • Assembly RSS
Nov 17th, 2008
0

Assembly help

Expand Post »
Hello, I need help with a puzzle I am trying to make in assembly. the description is down below

There is a famous puzzle invented in the 19th century which you may have seen, or indeed tried to solve. Imagine a tray consisting of 16 spaces arranged in four rows. So, there are four slots in each row. On these 16 spaces, there are 15 tiles numbered in ascending order. The space is at the bottom right-hand corner. This is known as the “Golden Board” or, more simply, the solution. An approximation of what it looks like is shown in the table below:
______________________________
|1|2|3|4|
|5|6|7|8|
|9|10|11|12|
|13|14|15|_|
_________________________________
Now imagine that these tiles are rearranged in some random order that looks something like this:
_____________________________
|1|6|4|2\
|7|_|11|3|
|5|9|10|8|
|13|15|15|12|
_______________________________

In order to solve the puzzle, you have to slide them around the board to arrive back at the initial “Golden Board”.

I have to do the following:

1. load up a grid on screen and initialise it so that the tiles are in the correct order.
2. Allow the user to press the “r” key to generate a random starting position.
3. allow the user to make a move. (how you do this is up to you)
4. determine how many moves it takes the player to win the game. When a winning position has been reached, (I.E., when the tiles are back in order) you should print a message telling the user how many moves it took.

My question is how do I display the tile grid with numbers in them and allow user to select a tile. Any help is appreciated.Thanks(I am using tasm,tlink and its for x86 platform)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
SmokyMo is offline Offline
8 posts
since Oct 2007
Dec 12th, 2008
0

Re: Assembly help

Reputation Points: 40
Solved Threads: 4
Junior Poster in Training
low_coder is offline Offline
55 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: Motorola motorola 68k converting uppercase to lower case
Next Thread in Assembly Forum Timeline: Need help if possible pls!!!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC