Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
10-28-2010, 04:27 AM #1
- Join Date
- Oct 2010
- Thanked 0 Times in 0 Posts
$40($50 if done by Friday) Simple java code using 2 predefined and 2 undefined class
1) Project Details: (be as specific as possible): Need Someone to write code for a interactive fiction script. All this requires is for you to finish two very simple classes that are outlined with notes explaining what method calls to use, etc. and employ the use of two other complicated classes which are already completed for you. You then will need to follow 10-15 simple steps in order to create java code that will do exactly what the directions will tell you. This requires nothing more than simple if, while, switch type level java knowledge and very little else.
2) Payment Amount: $40
3) Payment method/ details (Paypal, check? Timeline?): Will Pay Via Paypall immediately upon completion.
4) Additional Info (about project or potential bidders): If this code is written and runs correctly before Friday at 10:30 p.m. the payment will be $50
First off much of this code is nothing more than requiring if, switch, while statements toggling between different print output scenarios. You CAN do this easily, I'm just ignorant of java programming to the nth degree.
I am trying to make an interactive fiction script. You remember those old first attempts at video games? Well I am pulling all my hair out with this one. Well, if you can create, with what will be very simple coding to anyone with a relatively decent amount of programming experience, a java code that compiles the interactive fiction I would be so grateful.
If its absolutely necessary I am even willing to pay you $35 (negotiable) on PayPal for what will take you no longer than half an hour at the most.
Alright there are four classes that are already outlined that you will need to use. I will attach all four in a .zip file, with four .java files inside. You have to finish the first two classes chest and lamp..this will be easy. Just look over the map class and room class (you don't even really need to do this probably). They are complete already for you (When looking at the MAP class please don't say, well f*ck this this looks super complicated. The difficult code is not expected to be understood or paid attention to(the method behind the curtain, just copy paste this. You DON'T need to understand this.) If you do understand it this will be a cake walk for you and good for you, you must indeed be both very knowledgeable and intelligent.
I have posted directions to compile a new code using the 2 classes that you completed and the 2 classes (map,room) that are already complete and provided. Go ahead and read the directions first before even starting the classes to understand whats going on. While this POST is lengthy, you'll realize that the code work needed is EZ.
PLEASE help me I WILL Reward you.
Begin by taking a quick a look at the Map class. This class is completely implemented, you don't need to do any work on it, but you do need to know how to use it. In this game, a map is a square of size NxN. You call the getRoom(X,Y) to retrieve the Room object for a given square. The first number (X) gives the row and the second (Y) gives the column. The starting room is at (0, 0). The description of the interface for this class is given at the end of this pdf.
Now take a look at the Room class. This class is implemented for you as well. It contains a large number of methods for you to use during the game. As you can see, there are no setters, only getters. This means that for the most part you cannot modify any Room objects you receive. The exceptions are the clearKey() and clearLamp() methods that modify two of the room's sub-objects. You'll see down below when you need to call these methods. If a room does not have a specific sub-object, its variable will be set to null. You will need to test for this condition to see if a room has a sub-object or not. The description of the interface for this class is given at the end of this pdf.
You should NOT modify Room or Map to get your game working, your project will be tested with our own versions of these two files, so any modifications you make could result in your project not compiling or not working correctly.
1. You should start your work by implementing the Chest class (a skeleton is provided for you). It needs to store whether it is locked or not, a String describing the contents, and which key it was locked with. The method stubs for this class are provided with comments, be sure to implement them the way they are described. You should not add any more methods to this class.
2. Next, implement the Lamp class (the class definition is provided for you), it only needs to store whether it is lit or not. Follow the rules of encapsulation/information hiding, and prevent any other class from accessing or modifying your instance variables directly.
3. From there, create a Key class. No skeleton is provided for you, you must create it from scratch. The key should only have one method: public void use(Chest onChest). Calling this method should simply call the unlock method on the given chest.
4. Then, create a player class. No skeleton is provided for you, you must create it from scratch.
You're responsible for adding instance methods and variables. A player object will represent the user playing the game, and thus needs to store which map square they are currently on, the lamp and key. You should create instance class type variables for the lamp and key, and if they happen to be null, the player does NOT currently have them (same is true for the Room objects as well). Be sure to follow encapsulation rules here too.
5. Once these are done, create a class called Adventure and write the main method of your program in it. The idea is you loop repeatedly until the player dies, or finds the treasure. Every time the player moves, update the player's position and get the appropriate Room object from the map. Using this object, display the appropriate text to the user based on what command they type in. A list of commands is given below:
1. GET LAMP – If the lamp is present in the current room, this transfers the lamp from the room to the player. Be sure to clear the lamp from the room afterwards. Print “OK” if successful, or “No lamp present” if not.
2. LIGHT LAMP – If the player has the lamp, this sets it to lit. Print “OK” if successful, or “You don't have the lamp to light” if the player doesn't have the lamp.
3. NORTH, SOUTH, EAST, WEST – move the user up 1 square (-1 x), down 1 square (+1 x), right one square (+1 y), or left one square (-1 y). Once you move into a new room, you should print out its description, so the user doesn't have to type LOOK every time. Be sure to check the current room object to see if the given direction is valid. If not, print (“Can't go that way”). If the current room isDark(), and the player doesn't have the lamp OR the lamp is not lit, the player is eaten by a grue and the game is over. (see below for an example)
4. LOOK – This prints the description of the current room object, as well as any objects that are in the room. You should also print which exits from the room are valid. If the room isDark() and the player does not have the lamp or the lamp is not lit, then instead of printing the description, tell them: “It is pitch black, you can't see anything. You may be eaten by a grue!”. (see below for an example)
1. If the lamp is present in the room, print “There is an old oil lamp here that was made long ago” after you have printed out the room description.
2. If the key is present in the room, print “You see the outline of a key on a dusty shelf that's covered in dust.” after you have printed out the room description.
3. If the chest is present in the room, print “There is a large, wooden, massive, oaken chest here with the word “CHEST” carved into it” after you have printed out the room description.
5. GET KEY – If the key is present in the room, this transfers the key to the user's inventory. Be sure to clear the key from the room afterwards. Print “OK” if successful, “No key present” if not.
6. OPEN CHEST – If the chest is present in the room and is unlocked, then this should print out the chest's contents and end the game. If the chest is locked, print “The chest is locked”. If the chest is not present in the room, print “No chest present”.
7. UNLOCK CHEST – If the user has the key, call the use() method with the chest object to unlock it, then print “OK”. If the user doesn't have the key, print “Need a key to do any unlocking!”. If the chest is not present, print “No chest to unlock”.
8.When your program starts, print out the following text:
Welcome to My Adventures: Episode I The Adventure of the Cave of Redundancy Adventure By: (Your name)
Thanks in advance,
11-01-2010, 05:52 AM #2
- Join Date
- Aug 2009
- Thanked 1 Time in 1 Post
11-01-2010, 08:40 AM #3
- Join Date
- Sep 2010
- Delhi-NCR (India)
- Thanked 0 Times in 0 Posts
I think your budget is low for this work.
Get a Simple 5 pages website in only $99
Contact on skype "ashishsaxena.net"