How to make a really basic alleyway for a beginner

  Hello,I am a student making a project related to games and I picked an alleyway.I've
read through a couple of threads on here dealing with making a game of
alleyway in LabView.I a still a newbie and I am asking for some
guideance inorder to be able to make such a game.I ask you to please have some patience with me.
  I
am ,as you figured it out ,EchoWolf's class mate. And I also like also
to learn LabView not just coping and cheating for I would like to
increase my knowledge in LabView and because the purpose of this assignment is to learn.
 I
have seen with EchoWolf's post and I was impressed how I was able to
make a ball bounce from different starting positions and different
angles.
As I want to keep this game basic, I don't think I'll worry about having different ball speeds so far.
Alley
way is a game when the ball hits the brick and it
breaks(disappears),how can I do it do I need to vanish it using the
property node.
I am sorry, I was not taught enough and I only ask
for guideance and patience for I am a quick learner and I am very good
at Math and Physics and I have some experience in C++ although the
syntax stinks.
Due to my inexperience, this might thake a lot of time.I thank you
for any and all help anyone may be able to provide. Thank you in
advanced for your patience.May I never fail you.
This is what I have found .XD
 I am having trouble posting this message.
“Give a man a fish and he will eat for a day; teach a man to fish and he will eat for a lifetime”
"to learn a lesson is a far better reward than to win a prize early in the GAME"
Attachments:
alleyway.llb ‏318 KB

LOL,
First, let's play nice and actually give the source of the code you attached. I have the gut feeling that it is overly complicated and could be done with 25% of the code.
As a first step, I would enable "smooth updates" on the image indicator to prevent the annoying flickering
Echo Wolf2 wrote:
As I want to keep this game basic, I don't think I'll worry about having different ball speeds so far.
Yes, you have to worry, because the speed e.g. needs to change sign when it hits an object. Of course you could solve it with complex data and keep the speed magnitude constant.
Echo Wolf2 wrote:
Alley way is a game when the ball hits the brick and it breaks(disappears),how can I do it do I need to vanish it using the property node.
I don't think you understand the meaning of "property node". What exactly did you have in mind?
Echo Wolf2 wrote:
I am sorry, I was not taught enough and I only ask for guideance and patience for I am a quick learner and I am very good at Math and Physics and I have some experience in C++ although the syntax stinks.
It's probably the wrong approach trying to reverse engineer existing complicated code, so what I would do is start with some simple code like your classmate, writing someting where the ball bounces off walls only. Then you can expand it and add bricks. At the end add a paddle for user control.
Make a plan about good data structures. How is the arena represented in memory?
Echo Wolf2 wrote:
Due to my inexperience, this might thake a lot of time.I thank you for any and all help anyone may be able to provide. Thank you in advanced for your patience.May I never fail you.
The only way to really gain experience is to write programs. It's been 6+ hours since you posted. How far did you get in the meantime? Show us what you are doing and please ask questions when you get stuck.
We won't write assignments for you, but we are willing to nudge you in the right direction.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • How to make a really basic pong game for a beginner

    Hello.  I've read through a couple of threads on here dealing with making a game of pong in LabView, but in them the users had questions with far more complex aspects of the program than I want to deal with.  I am a beginner programmer in LabView with limited experience in Java and Visual Basic programming.  I was tasked with creating a game over winter break, and now that I finally have some time (this weekend that is), I decided that I'd make a really simple game of pong.  However, I have seriously overestimated the difficulty of this for a beginner who has very limited knowledge of Lab View.
    I ask you to please have some patience with me.
    I know what I want to do, and just need help inplementing it.
    Here is the idea for my design to keep it as simple as possible:
    -Create a field (I am not sure what to use for this, but from my reading it appears that some sort of a picture output is needed, but I cannot find that anywhere).
    -Set up some simple function that can output the dimensions of this field to use with collision tracking.
    -Create a ball that can be tracked by the program.
    -From my reading I understand that the simplest way to "bounce" the ball off the sides appears to simply reverse the X velocity of the ball when it strikes the vertical boundaries and the Y velocity when it strikes the horizontal boundaries.
    -Insert some sort of a "paddle" that the user can control with the left and right arrow keys.
    Now, as I have mentioned I am a beginner with approximately one month maximum knowledge of this software, spread over about a year.  I want to take things slow.  So for starters, would anyone be willing to walk me through creating a visual output for this and creating a ball that will bounce off all sides?
    If I can at least get that far for now, then I can move on (with help I hope!) of inserting an interactive interface for the "paddle."
    I have found some LabView code for a simple game like this, but it also includes a score keeping loop as well as an "automatic play" option, and I am attempting to wade through all that code to find the bones of it to help me with this, but due to my inexperience, this might thake a lot of time.
    I thank you for any and all help anyone may be able to provide.

    EchoWolf wrote:
    -Create a field (I am not sure what to use for this, but from my reading it appears that some sort of a picture output is needed, but I cannot find that anywhere).
     Wel, there is the picture indicator in the picture palette. In newer versions it's called "2D picture". The palettes have a search function. Using the palette search function is a basic LabVIEW skill that you should know. If you've seen the example for the other discussion, it uses a 2D boolean array indicator. The boolean array is only recommended for a monochrome very low resolution display.
    EchoWolf wrote: -Set up some simple function that can output the dimensions of this field to use with collision tracking.
    -Create a ball that can be tracked by the program.
    That seems backwards. Properly programmed, the code always knows the dimension and the ball position. The program generates, (not tracks!) the ball movement. Of course you need to do some range checking on the ball position to see when it collides with the walls.
    EchoWolf wrote:
    -From my reading I understand that the simplest way to "bounce" the ball off the sides appears to simply reverse the X velocity of the ball when it strikes the vertical boundaries and the Y velocity when it strikes the horizontal boundaries.
    Of course you could make it more realistic by keeping track of three ball parameters: x, y, spin.
    EchoWolf wrote:
    -Insert some sort of a "paddle" that the user can control with the left and right arrow keys.
    Pong is typically played with the up-down arrow keys.
    EchoWolf wrote:
    Now, as I have mentioned I am a beginner with approximately one month maximum knowledge of this software, spread over about a year.
    LabVIEW knowledge is not measured in time units. What did you do during that month? Did you attend some lectures, study tutorials, wrote some programs?
    EchoWolf wrote:
    So for starters, would anyone be willing to walk me through creating a visual output for this and creating a ball that will bounce off all sides?
    I have found some LabView code for a simple game like this, but it also includes a score keeping loop as well as an "automatic play" option, and I am attempting to wade through all that code to find the bones of it to help me with this, but due to my inexperience, this might thake a lot of time.
    Start with the posted example and delete all the controls and indicators that you don't want, then surgically remove all code with broken wires.
    Alternatively, start from scratch: Create your playing field. Easiest would be a 2D classic boolean array that is all false. Use initialize array to make it once. Now use a loop to show the ball as a function of time.
    Start with a random ball position. to display it, turn one of the array elements true before wiring to the array indicator using replace array subset.
    Keep a shift register with xy positions and xy velocities and update the positions as a function of the velocities with each iteration of the loop. Do range checking and reverse the velocieis when a edge is encountered.
    What LabVIEW version do you have?
    LabVIEW Champion . Do more with less code and in less time .

  • How to make Add to Favorites Option for website?

    Please Advice how to make Add to Favorites Option for the
    Website.
    Appreciated
    Thank You

    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=189&threadid =1191543&highlight_key=y&keyword1=favorites

  • How to make a Colorful Gif Image for Holi

    How to make a colorful Gif Image for Happy Holi 2014

    Okay, I know this doesn't answer your question, but don't get me wrong. A logo is meant to be the way it was designed - upright, no flipping/ swiveling animation. Why exactly do you want to let your logo turn around?
    If its to grab attention, why dont you consider animating the area on which your logo sits (header)? Or maybe add nice transitive slideshows on your main content area to add more interactivity?

  • How to make F7,F8,F10 disabled for security?

    Hi alll,
    Pls can any boady tell me ; how to make F7,F8,F10 disabled for security purposes?
    Abdetu.

    Hello Gerd
    Thanks for reply,
    i made a search for the file u mentioned
    FMRWEB; i found it on path C:\orant\FORMS60
    having the following :
    # FMRWEB.RES is the key definition file for webforms. The syntax is:
    # JFN : JMN : URKS : FFN : URFD (whitespace ignored)
    # JFN = Java function number
    # JMN = Java modifiers number
    # URKS = User-readable key sequence (double-quoted)
    # FFN = Forms function number
    # URFD = User-readable function description (double-quoted)
    # JAVA FUNCTION NUMBER
    # 33 = PageUp
    # 34 = PageDown
    # 35 = End
    # 36 = Home
    # 37 = LeftArrow
    # 38 = UpArrow
    # 39 = RightArrow
    # 40 = DownArrow
    # 65 - 90 = Ctrl+A thru Ctrl+Z (These will always have the control
    # modifier explicitly included, as well as any other
    # modifiers that might be used.)
    # 112 - 123 = F1 thru F12
    # 9 = Tab (Ctrl+I, without the control modifier)
    # 10 = Return (Ctrl+J, without the control modifier)
    # JAVA MODIFIERS NUMBER
    # Equal to the sum of the values for the modifier keys:
    # 0 = None
    # 1 = Shift
    # 2 = Control
    # 4 = Meta
    # 8 = Alt
    # FORMS FUNCTION NUMBER
    # The Forms function numbers match the function numbers found in a
    # typical Forms key binding file.
    # USER-READABLE STRINGS
    # The double-quoted strings appear when users click [Show Keys], and
    # are used for this purpose only. These strings can be translated as
    # needed. Note that the strings do not affect what actually happens
    # when end users press a particular key sequence.
    9 : 0 : "Tab" : 1 : "Next Field"
    9 : 1 : "Shift+Tab" : 2 : "Previous Field"
    116 : 0 : "F5" : 3 : "Clear Field"
    38 : 0 : "Up" : 6 : "Up"
    40 : 0 : "Down" : 7 : "Down"
    33 : 0 : "PageUp" : 12 : "Scroll Up"
    34 : 0 : "PageDown" : 13 : "Scroll Down"
    69 : 2 : "Ctrl+E" : 22 : "Edit"
    10 : 0 : "Return" : 27 : "Return"
    76 : 2 : "Ctrl+L" : 29 : "List of Values"
    115 : 0 : "F4" : 32 : "Exit"
    75 : 2 : "Ctrl+K" : 35 : "Show Keys"
    83 : 2 : "Ctrl+S" : 36 : "Commit"
    118 : 1 : "Shift+F7" : 61 : "Next Primary Key"
    117 : 0 : "F6" : 62 : "Clear Record"
    38 : 2 : "Ctrl+Up" : 63 : "Delete Record"
    117 : 1 : "Shift+F6" : 64 : "Duplicate Record"
    40 : 2 : "Ctrl+Down" : 65 : "Insert Record"
    119 : 1 : "Shift+F8" : 66 : "Next Set of Records"
    1005 : 0 : "Down" : 67 : "Next Record"
    1004 : 0 : "Up" : 68 : "Previous Record"
    118 : 0 : "F7" : 69 : "Clear Block"
    66 : 2 : "Ctrl+B" : 70 : "Block Menu"
    34 : 1 : "Shift+PageDown" : 71 : "Next Block"
    33 : 1 : "Shift+PageUp" : 72 : "Previous Block"
    116 : 1 : "Shift+F5" : 73 : "Duplicate Field"
    119 : 0 : "F8" : 74 : "Clear Form"
    122 : 0 : "F11" : 76 : "Enter Query"
    122 : 2 : "Ctrl+F11" : 77 : "Execute Query"
    69 : 3 : "Shift+Ctrl+E" : 78 : "Display Error"
    80 : 2 : "Ctrl+P" : 79 : "Print"
    123 : 0 : "F12" : 80 : "Count Query"
    85 : 2 : "Ctrl+U" : 81 : "Update Record"
    121 : 3 : "Shift+Ctrl+F10" : 82 : "Function 0"
    112 : 3 : "Shift+Ctrl+F1" : 83 : "Function 1"
    113 : 3 : "Shift+Ctrl+F2" : 84 : "Function 2"
    114 : 3 : "Shift+Ctrl+F3" : 85 : "Function 3"
    115 : 3 : "Shift+Ctrl+F4" : 86 : "Function 4"
    116 : 3 : "Shift+Ctrl+F5" : 87 : "Function 5"
    117 : 3 : "Shift+Ctrl+F6" : 88 : "Function 6"
    118 : 3 : "Shift+Ctrl+F7" : 89 : "Function 7"
    119 : 3 : "Shift+Ctrl+F8" : 90 : "Function 8"
    120 : 3 : "Shift+Ctrl+F9" : 91 : "Function 9"
    113 : 0 : "F2" : 95 : "List Tab Pages"
    72 : 2 : "Ctrl+H" : 30 : "Help"
    ------------------------------------end of file-----------------------------------------
    Now if this is the file i have How can i make F7,F8,F10 disabled for security?
    can u clarify to me how can handle this,i am afraid i may do something wrong..!!!
    But how do you want to commit without the shortcut?? What do u mean by a shortcut..?
    Thanks in advance..
    Regards,
    Abdetu.

  • How to make Safari remember my password for sites whiteout promoting me? I mean i don't want to ask me if i want to save the password or not, just save it automatically to my keychain.

    How to make Safari remember my password for sites whiteout promoting me? I mean i don't want to safari ask me if i want to save the password or not, can it just save it automatically to my keychain qhitout asking?

    No. It's a safety feature. Select the appropriate response and the next time you visit, you won't be prompted.

  • How to display text type(Basic Texts) for product in CRM WebUI

    hi,
    I am new to CRM WebUI. We have Basic Texts (note type) configured for CRM Products. We want to store long desciption of product information here. I have added it through text types and text determination procedure configurations
    1. CRM > Basic Functions > Text Management  > Define Text Objects and Text Types and
    2. CRM > Basic Functions > Text Management  > Define Text Determination Procedure.
    I can see my text type comming in SAPGUI. I have a business requirement to show this text type on the WebUI...
    Please let me know how to make it appear on the product maintainance page in WebUI.
    regards
    Raghavendra

    It should be available in std view. If not you can make the Assignment Block visisble in your Overview Page (Component - PRDTXT, View - ListWindow). You will get a Assignment Block named Notes.
    Hope this is what you are looking for.
    Regards,
    Alin

  • How to make my iphone stop asking for my friend's Apple ID?

    First question: why does apple website logs me out every minute saying "session time out" or something(i'm using chrome on iPad)..!
    Second Question: why after i typed such a big question and when i switch tab and come back to this tab, the tex disappears (both chrome and safari for iPad)?
    Before going to my actual question:
    I(from USA) have an iPhone 5 and iPad 4, and bought the same for my dad(India), He has his own apple account and mine is separate.
    I've recently send the iPhone 5 (factory unlocking it for 10$ before sending it to him- I have proof of purchase for all 4 devices)  after the 5s is released.
    Third question: Why can't I add my dad's(Indian) phone number for iMessage?
    Since I used that phone with my USA SIM card for 1 day before sending it to him, it remembered my phone number, but even after trying everything except complete reset on my dad's iPhone( since he can't manage to download all apps from scratch again) and didn't get a new sim yet, we tried everything but I couldn't make the Apple ID remember my dad's phone number..!
    Fourth question: As my laptop broke, I used my friend's Mac to check the unlock is successful or not! Now when my dad tries to install an app from AppStore from his iPhone, it asks for password of my friend's Apple ID ,
    My question is how to add his phone number and how to make it forget my friend's Apple ID
    In Apple.com> manage Id> it doesn't show my friend's id anywhere. Do I need to de-authorize from his Mac?

    Hi, I've tried a reset all, and restored from another backup(iCloud) and it stopped asking my friend's Apple ID(its been two days i've restored, and my didn't complain yet).
    next, i've already tried all the steps you said.
    my dad uses his gmail account for apple devices(same id for his iPad too), and i already checked "My Phone" number is set to my dad's phone number.
    i asked my dad to turn off iMessage and Facetime, removed the sim, reset network settings and when he inserted the sim back, it shows his number, when he turns on the iMessage and  logs in using his email, it shows my phone number..!
    i went to view account, and it redirected to appleid.apple.com and i can see his phone number in the account.
    checked the location, set to India, time zone and everything looks fine.
    But the Apple ID is remembering my number instead of registering his number..!
    BTW, can you elaborate your reply for my 3rd Question.
    I've created a contact record with his name, phone number(with country code) and email addresses.
    Now what is the next step..?
    "setup phone to register with iMessage" can you explain this.
    I'm planning to remove sim in my phone, restore it to new device, setup the required softwares etc, take an iCloud back-up and ask him to restore from that backup. Since, the Apple ID doesn't know any phone number, when he inserts sim and turns on iMessage it should register the new number..!

  • How to make iBooks available in iBookstore for Sri Lanka and India?

    Does anyone know how to make iBooks available for purchase in iBookstore for Sri Lanka and India?  I have tried going through iTunes Connect to add regions, but it doesn't give me the option to add any more.  Thanks

    ali.basheer.ahamed wrote:
    Can I know How to add to the Indian store please. I have been trying the same - unable to add.
    Consult this list to see whether paid books are available in those countries:
    http://support.apple.com/kb/TS3599
    If not, you have to use another store, like Kindle, Nook, Kobo, Googlebooks, or Sony.

  • How to make custom start end shapes for stroke (arrowheads)...

    hello...
    Indesign cs4 have nice start end stroke shapes like arrowheads, circles, squares...circles is clear, without fill. I need fill in it.
    How to make custom shapes or edit existings start/end shapes to functioning like original provided with indesign?
    Maybe illustrator cs4 have this?

    There's no way to edit line endings in ID. You would have to make a compound path from a line with no ending and a second path or shape for the end.

  • How to make Rule to get notification for Shared Mailbox on Outlook 2013

    Hi All, is anyone have idea how to make rule on Outlook 2013 to get notify if you receive new email from your "Shared Mailbox".
    Is it possible that make a Rule for that notification? I have outlook here and I can't see notification when I receive new emails. Hope anyone can help me how to do this.

    Assuming the mailbox is open in outlook as a shared mailbox, you can use a macro to watch the folder: 
    Private WithEvents Items As Outlook.Items
    Private Sub Application_Startup()
      Dim Ns As Outlook.NameSpace
      Set Ns = Application.GetNamespace("MAPI")
      Set Items = GetFolderPath("Accounting\Inbox").Items
    End Sub
    Private Sub Items_ItemAdd(ByVal Item As Object)
      On Error Resume Next
    MsgBox "new message  from " & Item.SenderName & " in shared folder"
    End Sub
    Diane Poremsky [MVP - Outlook]
    Outlook & Exchange Solutions Center
    Outlook Tips
    Subscribe to Exchange Messaging Outlook weekly newsletter

  • How to make Form Field names appear for User??

    Hi im creating a form template that will be sent to over 150 stores so I need this to work and be easier for my stores.
    Is is possible to make the field names visable for the user so they know what details are need in the fields?
    Please if anybody can help!!

    Sorry I forgot to mention I need it to visible on Text boxes, doesnt seem to be working

  • How to make an a basic attack in my text based game

    hey guys! i really need some genuine help on how to create an attack for my monsters and player. the attack should be basic: if the room contains a monster, then the monster attacks when the player goes inside the room. then the player can type a command to attack the monster. the attack should just deduct the hp of the monster. so the player can keep attacking till the monster is "dead"(this is where i remove the monster).
    anyway i tried alot in creating the attack but i failed all the time, messing my code even more. please!!!!! help!!!
    my monster class:
    public class Monster
    private int hp, stage;
    private String name;
    public Monster(String name, int stage)
    this.name = name;
    this.stage = stage;
    if(stage == 1) {
    hp = 1;
    else if(stage == 2) {
    hp = 2;
    else if(stage == 3) {
    hp = 2;
    else if(stage == 4) {
    hp = 3;
    else if(stage == 5) {
    hp = 4;
    else if(stage == 6) {
    hp = 6;
    public int monsterStage()
    return stage;
    public String getName()
    return name;
    this is where i created the monsters in my main game class:
    private Monster skeleton, sphinx, zombie, vampire, werewolf, undeadking;
    setting the monster to a room:
    skeleton = new Monster("skeleton1", 1);
    skeleton = new Monster("skeleton2", 1);
    sphinx = new Monster("sphinx1", 2);
    sphinx = new Monster("sphinx2", 2);
    sphinx = new Monster("sphinx3", 2);
    zombie = new Monster("zombie", 3);
    vampire = new Monster("vampire1", 4);
    vampire = new Monster("vampire2", 4);
    werewolf = new Monster("werewolf", 5);
    undeadking = new Monster("undeadking", 6);
    //setting the monster to a place
    bridge.addMonster("skeleton1", skeleton);
    castleDoor.addMonster("sphinx1", sphinx);
    castleChest.addMonster("zombie", zombie);
    dungeonDoor.addMonster("sphinx2", sphinx);
    castleStair.addMonster("werewolf", werewolf);
    dungeonBridge.addMonster("vampire2", vampire);
    dungeonBook.addMonster("sphinx3", sphinx);
    dungeonChest.addMonster("skeleton2", skeleton);
    throneCenter.addMonster("undeadking", undeadking);
    ps.: please help me! each room has one monster only and they are stored in hashmaps

    Here is a start of a basic text based game--it doesn't level or regen characters nor give healing or have new weapons...
    package ForumJunk;
    import java.util.Random;
    import java.util.Scanner;
    public class ForumJunk{
      private final int widthX;
      private final int heightY;
      private int myX;
      private int myY;
      private int myLevel;
      private int baseHP;
      private int myHP;
      private int myTreasure;
      private String[] myWeapon = {"fist", "open hand", "dagger", "short sword", "long sword", "b-sword", "2H sword"};
      private int[] myWeaponMaxDamage = {2, 3, 4, 6, 10, 12, 16};
      private int monsterFillFactor = 40;
      private int[][] monsterLevel = {{1, 1, 1}, {2, 2, 2}, {3, 3, 3}};
      private String[][] monsterName = {{"Skeleton", "Orac", "Kobald"}, {"Zombi", "Wolf", "Giant Rat"}, {"Bandit", "Mummy", "Ghost"}};
      private int[] monsterMaxDamage = {2, 4, 6};
      private myRoom[][] room;
      private Random rand;
      public ForumJunk(){
        widthX  = 100;
        heightY = 100;
        myLevel = 1;
        rand = new Random();
        baseHP   = 16;
        myHP     = baseHP;
        for(int i=0; i<myLevel; i++) myHP = myHP + rand.nextInt(4) + 4;
        room = new myRoom[widthX][heightY];
        for(int i=0; i<widthX; i++)for(int j=0; j<heightY; j++)room[i][j]=new myRoom();
        myX = rand.nextInt(widthX);
        myY = rand.nextInt(heightY);
        myTreasure = 0;
        fillMonster();
      public void doAttack(){
        if(!(room[myX][myY].monster != null)){
          System.out.println("Oh, it must have been my shadow; there's no monsters here \n");
          return; //no monster
        if(rand.nextBoolean()){
         doHumanAttack();
         if(room[myX][myY].monster.hp > 0) doMonsterAttack();
        }else{
          doMonsterAttack();
          doHumanAttack();
      public void doHumanAttack(){
        int weaponIndex = 0;
        if(myLevel<myWeaponMaxDamage.length) weaponIndex = myLevel;else weaponIndex = myWeaponMaxDamage.length-1;
        System.out.println("Attacking with " + myWeapon[weaponIndex] + " ...");
        int damage = myLevel * rand.nextInt(myWeaponMaxDamage[myLevel]);
        room[myX][myY].monster.hp -= damage;
        if(damage>0) System.out.println("Hit for " + damage + " damage\n");
        else System.out.println("I missed!\n");
        if(room[myX][myY].monster.hp <= 0) System.out.println("The " + room[myX][myY].monster.name  + " is dead.");
      public void doMonsterAttack(){
        System.out.println("The " + room[myX][myY].monster.name  + " is attacking...");
        int damage = rand.nextInt(monsterMaxDamage[room[myX][myY].monster.level-1]);
        myHP -= damage;
        if(damage>0) System.out.println("I've been hit for " + damage + " damage\n");
        else System.out.println("It missed me!\n");
        if(myHP<=0){
          System.out.println("Oh no, I'm dead!!!!!");
          System.exit(0);
      public void doStatus(){
        System.out.println();
        System.out.println("  Status:");
        System.out.println("    Room: " + myX + ":" + myY);
        System.out.println("      HP: " + myHP);
        System.out.println("Treasure: " + myTreasure + " gp");
        System.out.println("   Level: " + myLevel);
        System.out.println();
      public void doTreasure(){
        if(!(room[myX][myY].monster != null)){
          System.out.println("What--do you expect it just to be laying around in every room? \n");
          return; //no monster
        if(room[myX][myY].monster.hp>0){
          System.out.println("If there is any treasure that " + room[myX][myY].monster.name + " is guarding it.\n");
          return; //no monster
        myTreasure += room[myX][myY].monster.treasure;
        System.out.println("I found " + room[myX][myY].monster.treasure + " gp\n");
        room[myX][myY].monster = null;
      public void fillMonster(){
        int fill = (widthX * heightY * monsterFillFactor) / 100;
        int x = 0;
        int y = 0;
        boolean gen = false;
        for(int i=0; i<fill; i++){
          gen = true;
          while(gen){
            x = rand.nextInt(widthX);
            y = rand.nextInt(heightY);
            if(!(room[x][y].monster != null)){
              room[x][y].monster = new Monster(rand.nextInt(3)+1);
              gen = false;
      class Monster{
        int level = 0;
        int hp   = 0;
        int treasure = 0;
        String name = "";
        Monster(int level){
          this.level = level;
          hp = 1;
          for(int i = 0; i<level; i++) {
            hp += rand.nextInt(6);
            treasure += rand.nextInt(100);
          name = monsterName[level-1][rand.nextInt(3)];
      class myRoom{
        Monster monster = null;
        //what ever else you want to put in here
      public static void main(String[] args){
        String myIN = "";
        Scanner scan = new Scanner(System.in);
        ForumJunk fj = new ForumJunk();
        System.out.print("I am in room: " + fj.myX + ", " + fj.myY + " I have " + fj.myHP + " hit points and " + fj.myTreasure + " treasure ");
        if(fj.room[fj.myX][fj.myY].monster!=null){
          System.out.println("There is a  " + fj.room[fj.myX][fj.myY].monster.name + " here!");
        System.out.println("\n");
        while(!(myIN=scan.next()).equals("exit")){
          if(myIN.equals("north")){
            fj.myY -=1;
            if(fj.myY<0) fj.myY=fj.heightY-1;
          }else if(myIN.equals("south")){
            fj.myY +=1;
            if(fj.myY==fj.heightY) fj.myY=0;
          }else if(myIN.equals("west")){
            fj.myX -=1;
            if(fj.myX<0) fj.myX=fj.widthX-1;
          }else if(myIN.equals("east")){
            fj.myX +=1;
            if(fj.myX==fj.widthX) fj.myX=0;
          }else if(myIN.equals("attack")){
            fj.doAttack();
          }else if(myIN.equals("weapon")){
            System.out.println("I'll be using my " + fj.myWeapon[fj.myLevel] + " to attack\n");
          }else if(myIN.equals("treasure")){
            fj.doTreasure();
          }else if(myIN.equals("status")){
            fj.doStatus();
        System.out.print("I am in room: " + fj.myX + ", " + fj.myY + " I have " + fj.myHP + " hit points and " + fj.myTreasure + " treasure ");
        if(fj.room[fj.myX][fj.myY].monster!=null){
          System.out.print("There is a ");
          if(fj.room[fj.myX][fj.myY].monster.hp<=0) System.out.print("dead ");
          System.out.println(fj.room[fj.myX][fj.myY].monster.name + " here!");
        System.out.println("\n");
      System.out.println("Bye!");
    }

  • How to make the common control button for all pages in TABCONTROL​?

    Dear all,
               I'm using TABCONTROL for my application. I'm having STOP and SAVE control. I have to show this button to all pages  in TABCONTROL.. How do i make it?
    Kindly help me?..
    Regards,
    Srinivasan.P
    Solved!
    Go to Solution.

    Hi srinivasan,
    If you want to keep "Save" and "Stop" common, Why do you want to keep them on Tab control? Is your tab control taking entire space on Front panel? If so, you can have SAVE and STOP on other vi, and you can call this vi (MODAL).
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.

  • How to make a Recovery Image DVD for my Satellite A200-1GB?

    Hi Experts,
    As I have wrote before I divided my HDD 2nd partitions in to 2partitions.
    Now I want to make a recovery DVD except the manufacturer provided DVD.
    The reason I want that is the USER MANUAL says when we are restoring by the manufacturer Provided DVD it will FORMAT all the Partitions and revert the HDD to original state (When it come it has two partitions).
    So now I'm trying to make a Recovery DVD to recover the notebook with out FORMATTING the second partitions.
    I just want to format only the C drive and install the Vista OS and other manufacturer provided software.
    Then the other drives will be safe and the data on those partitions will be safe.
    I kindly request you to help me on this.
    It's better if anybody can give me the instructions for that operation.
    Thanks !!!! :8}

    Hello
    It is pretty easy but you need right and Vista compatible program. I use WXP Norton Ghost but on this page you can find useful info about latest and Vista compatible version.
    I will obtain the same for me. It is very good program and I can really recommend Norton Ghost.

Maybe you are looking for