Assembly help

Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2007
Posts: 8
Reputation: SmokyMo is an unknown quantity at this point 
Solved Threads: 0
SmokyMo SmokyMo is offline Offline
Newbie Poster

Assembly help

 
0
  #1
Nov 17th, 2008
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)
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 23
Reputation: low_coder is an unknown quantity at this point 
Solved Threads: 2
low_coder low_coder is offline Offline
Newbie Poster

Re: Assembly help

 
0
  #2
Dec 12th, 2008
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC