How Software Gets Done  


Login

Software Buyers
Request bids
Search coders
My Buyer Account
Buyer help
Buyer articles
Buyer FAQ
Latest news
 
Software Coders
Newest open work
Browse all work
Search all work
My Coder Account
Coder help
Coder articles
Coder FAQ
Latest news
 
Affiliates
My Affiliate Account
Affiliate help
Affiliate FAQ
Latest news
 
Newest Bid Requests.
(See all)
Chatroom Needed Immediately
By blaster998 on Sep 30
Max Bid: $500


Fix link tracking program
By blaster998 on Sep 30
Max Bid: $75


Install TOMCAT on FreeBSD(repost)
By Kevbob on Sep 30
Max Bid: $100


Stormpay IPN Urgent Help Needed
By rohit123 on Sep 29
Max Bid: Open to fair suggestions


Spyware Application/ Spyware Scanner
By GuyB on Sep 29
Max Bid: $500


Web module in PHP/MySQL
By RXL on Sep 29
Max Bid: Open to fair suggestions


Click here to put this ticker on your own site and/or get live RSS newsfeeds

Open Work Categories.
Database 
(175 open)
   Access 
(53 open)
   MySQL 
(113 open)
   Oracle 
(11 open)
   SQL Server 
(72 open)
   Other DB 
(28 open)
Documentation / Tech Writing 
(26 open)
   Language (Human) Translations 
(10 open)
Data Entry 
(37 open)
Game Development 
(26 open)
Graphics / Art / Music 
(61 open)
   Graphics 
(65 open)
     Adobe AfterEffects 
(7 open)
     Adobe Photoshop 
(32 open)
     Adobe Premiere 
(6 open)
     3d Animation 
(21 open)
   Art (Misc.) 
(13 open)
   Music 
(7 open)
   Photography 
(5 open)
   3d Modeling 
(15 open)
Language Specific 
(121 open)
   Assembly / Machine language 
(15 open)
   ASP 
(65 open)
   ASP .NET 
(72 open)
   C# 
(75 open)
   C++ / C 
(162 open)
   Carbon (Mac OS) 
(5 open)
   Cocoa / Obj-C 
(5 open)
   Cold Fusion 
(11 open)
   Delphi 
(56 open)
   Java 
(102 open)
   JSP 
(21 open)
   Perl 
(47 open)
   Python 
(6 open)
   PHP 
(117 open)
   XML/XSL 
(33 open)
   Visual Basic 
(161 open)
   Visual Basic .Net 
(108 open)
   Other 
(78 open)
Misc 
(48 open)
   Middleware 
(3 open)
   CAD 
(3 open)
MultiMedia 
(28 open)
   Video Editing 
(5 open)
Network 
(34 open)
   Network Design 
(8 open)
   Network Implementation 
(7 open)
Platforms 
(80 open)
   Windows 
(195 open)
     MS Exchange 
(9 open)
     MS Office 
(28 open)
     Other 
(15 open)
   Darwin 
(1 open)
   Embedded Systems 
(16 open)
   Hand Held/PDA Programming 
(21 open)
   Internet Browser 
(47 open)
   Linux 
(63 open)
   Lotus Notes / Domino 
(3 open)
   UNIX 
(33 open)
Requirements 
(16 open)
Security 
(34 open)
Testing / Quality Assurance 
(22 open)
Web 
(171 open)
   Page Design 
(92 open)
   Flash 
(54 open)
   Marketing 
(15 open)
     Search Engine Optimization 
(12 open)
     Marketing (Other) 
(10 open)
   Web Services 
(91 open)
   Web (Other) 
(104 open)
Training 
(16 open)
   Computer Based 
(14 open)
Other
 
Other Sites

Download the free Rent A Coder IE toolbar!
 
Show Bid Request

Game of fifteen using Microsoft Visual C++ 6.0
Bid Request Id: 386
Bookmark in my 'To Do' list
Posted by: smonnoo (2 ratings)
(Software buyer rating 10)
Non-action Ratio: Very Good - 0.00%
Buyer Security Verifications: Unverified
Approved on: Jun 12, 2001
2:11:55 AM EDT
Bidding Closes: Jun 13, 2001
4:30:00 PM EDT
Viewed (by coders): 597 times
Phase:
100% of work completed and accepted. Coder has been paid.
Max Accepted Bid: Bidding is closed
Project Type: Unknown
Bidding Type: Open Auction
Categories: C++ / C
Enter chat room for this bid request
(0 active users at Sep 30, 2003 6:26:11 AM EDT)

Description:
FIFTEEN game is played on a 4x4 frame that contains 15 tiles numbered from 1 to
15. For example--

4 7 1 11
9 8 6 10
5 . 3 2
12 14 13 15

The dot represents an open space. The player slides one of the tiles that is adjacent to the open
space into the open space. For example, in the above situation the player may move the 8, 5, 3 or
14. If the player slides the 3 into the open space, then the frame will look like this:

4 7 1 11
9 8 6 10
5 3 . 2
12 14 13 15

If the player next moves the 6 into the open space, then the frame will look like this:

4 7 1 11
9 8 . 10
5 3 6 2
12 14 13 15

The goal is to arrive at the winning configuration--

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 .

Your job is to write a program that allows the user to play this game. Represent the frame as a
two-dimensional array of integers. Write a function with prototype--

void move(int [ ][4], int n)

that checks to see if n is valid (i.e. the number n is adjacent to the open space), and if so moves n
into the open space. Invalid moves are ignored.

Also write a function with prototype--

void display(int [ ][4])

that displays the frame as above. Use the setw manipulator to line the numbers up in columns of
width 4.

Deliverables:
Source code has to be compatible with
Using Microsoft Visual C++ 6.0

Your program should first display the rules to the user. Then it should initialize the frame to the
winning position and call the move function a thousand times with a random integer between 1
and 15, so that the frame is shuffled to a configuration from which it is possible to get to the
winning configuration. Not all of the calls will be valid moves, but the invalid moves will simply be
ignored. Note that this procedure is different than simply placing each number 1 to 15 into a
random position, for in this case it may be impossible to get to the winning configuration.

Once the frame has been initialized, display it and prompt the user to enter a move. Also give the
user the option of quitting. Use the move function to update the frame after each move, and the
display function to display it.

When the game is over, display the total number of moves.


Special Conditions / Other:
I need it by 06/14/2001 12:00pm


Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements. We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation. If you notice a violation please help out the site and report it. Thanks for your help.
 
Bidding/Comments:
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests.

See all rejected bids (and all comments)
Name   Bid Amount 
 
Date   Coder Rating  
This bid was accepted by the buyer!
bona
(4 ratings)
in Auckland, 
New Zealand
Bid id: 3,480
 
$70 (USD) Jun 12, 2001
8:05:18 AM EDT
 10
(Excellent)
   
Will be done.
 




Bid Request Search
 Advanced Search
Newest Open Work
Latest News  
Credentials


 

 
Rent A Coder upholds the rigorous business practices required to be both a BBB member and Square Trade vendor.
  • All customer issues addressed within 2 days
  • Openly disclosed pricing and return policies
  • Participation in mediation at buyer request
  • Superior selling track record
This site is verified through its parent company, Exhedra Solutions, Inc.
 
Top Coders.

Securenext
Rated a 9.96 on 127 jobs 
Buddies
Rated a 9.86 on 97 jobs 
Codman
Rated a 9.97 on 159 jobs 
hernest
Rated a 10 on 122 jobs 
Andrei Remenchuk
Rated a 10 on 14 jobs 
D-N-S
Rated a 9.93 on 40 jobs 
markesh
Rated a 10 on 24 jobs 
GribFritz
Rated a 9.89 on 158 jobs 
PSergei
Rated a 9.78 on 112 jobs 
ASP.NET
Rated a 9.86 on 62 jobs 

See all top coders...

(What makes a top coder?)

Top Exam Scorers

 
Other
Rent A Coder is PayPal verified through its parent company, Exhedra Solutions, Inc.

Created in partnership with:

 

Affiliate Sites
Latest News | About Us | Kudos | Feedback/Contact    Affiliates | Advertise    Privacy | Legal

Copyright © 2001, Exhedra Solutions, Inc. All rights reserved.
By using this site you agree to its Terms and Conditions.
"Rent A Coder" (tm), "Safe Project Escrow" (tm) and "How Software Gets Done" (tm)
are trademarks of Exhedra Solutions, Inc.