Announcement

Collapse
No announcement yet.

Java Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Java Help



    (I have the code for the board, I just need what's below VVVV)

    - Add a game piece to the game.(image that i have) Position it initially on the lower right corner (GO). Note that this image has transparency, thus it does show through all the material that is drawn underneath it.

    - Add a new button with the name Move that is going to move a game piece around the board. From the initial position, the game piece is first going to move left, and then up then right and back down to reach the Go position again, one section at a time. Note that you can implement this movement by using two position indicators, one marking whether the piece is going up or down and another one to indicate whether you need to move left or right.

    - You can remove the images from the corner positions, and move the game piece one by one, landing on every possible section in the game (this means that the corner images are not used as jail as in the real game).
    Warning: Disconnected From Server.
    paralyze> what is this, some sort of gay-out?
    paralyze> and nice try
    Sleuth> WTF
    Sleuth> OK QUIET
    JuNkA> LOL
    Sleuth> THOUGHTS COMING
    Sleuth> SHHH

    Warning: Disconnected From Server
    Thoughts> u wish
    Sleuth> WHAT THE FUCK
    Vue> LOOL
    Sleuth> LOLOLOLOL
    Sleuth> ABBOT IS COMING
    Sleuth> QUIET

    Warning: Disconnected from server
    abbot> ..
    Thoughts> LMFAO
    paralyze> ROFL
    Sleuth> stfu

  • #2
    Ikrit thinks people should do their own programming work. If you have any specific problems with something that you wrote, post the code and ask.
    Ban Ikrit

    Comment


    • #3
      I would help but I were learning java for while than I just forgot everything lol, Now that you remind me I wanna start learning it again. Well maybe in the future.
      (Paradise)>dj sage
      (HELLZNO!)>is he good, ive never heard his music
      1: Dynasty> LOL
      1:vue> LOL
      1:Cap> LOOL

      Comment


      • #4
        I dont necessarily need the entire working code, if you could get me started even that'd be great.
        Warning: Disconnected From Server.
        paralyze> what is this, some sort of gay-out?
        paralyze> and nice try
        Sleuth> WTF
        Sleuth> OK QUIET
        JuNkA> LOL
        Sleuth> THOUGHTS COMING
        Sleuth> SHHH

        Warning: Disconnected From Server
        Thoughts> u wish
        Sleuth> WHAT THE FUCK
        Vue> LOOL
        Sleuth> LOLOLOLOL
        Sleuth> ABBOT IS COMING
        Sleuth> QUIET

        Warning: Disconnected from server
        abbot> ..
        Thoughts> LMFAO
        paralyze> ROFL
        Sleuth> stfu

        Comment


        • #5
          Originally posted by Rhino_haha View Post
          I dont necessarily need the entire working code, if you could get me started even that'd be great.
          If you can't start the code, someone writing it for you won't help you.
          Ban Ikrit

          Comment


          • #6
            Agreed with Ikrit; there is nobody here that is going to do your homework.
            Go find a few (e-)books that learn you how to make your first basic program and start working on it yourself.
            Maverick
            Retired SSCU Trench Wars Super Moderator
            Retired SSCU Trench Wars Bot Coordinator
            Retired Trench Wars Core Administrator
            Subspace Statistics Administrator
            Former Mervbot plugin developer

            Comment


            • #7
              Practically nobody writes their own code completely so stop having a go.

              not that I can help.

              Comment


              • #8
                Funny how you tell that to 2 people that do write their own code.
                Ban Ikrit

                Comment


                • #9
                  ooo hasbro are going to sue you so bad
                  A drunken mans words are a sober mans thoughts

                  LIGHT4CHAMPS

                  Comment


                  • #10
                    Create a class called something like 'Piece'.

                    It needs at least 2 private data members xPos, yPos.
                    It needs at least 2 public functions: move and draw

                    Move can take as an argument (int numSquares) and it will update xPos and yPos. Draw will draw the piece at xPos, yPos.

                    After you "roll" you call Move and Draw. Something like:

                    distance = rollDice()
                    piece.move(distance)
                    piece.draw()

                    That's one way to design it. Deciding whether to do it this way, figuring out details, and coding should be up to you. Especially since we don't know all the details of the assignment.

                    EDIT: Thinking about it more:
                    xPos and yPos might need to be public data members if the board (rest of the game) needs to know where the piece is. For instance the board might need to know the xPos and yPos to know when a Community Card etc needs to be issued.

                    I can't remember if the game has cards that send you backwards "x" squares, but you might need to figure out whether Move can take negative numbers.
                    Last edited by geekbot; 12-13-2006, 02:42 PM.

                    Comment


                    • #11
                      I did a quick search and I think you can learn alot from this project http://sourceforge.net/projects/javamonopoly/
                      especially since it's not in such an advanced state yet and setup quite clearly.
                      Maverick
                      Retired SSCU Trench Wars Super Moderator
                      Retired SSCU Trench Wars Bot Coordinator
                      Retired Trench Wars Core Administrator
                      Subspace Statistics Administrator
                      Former Mervbot plugin developer

                      Comment


                      • #12
                        RANDOMIZE TIMER
                        FOR x = 1 TO 10000
                        PRINT "school is stupid and i hate school"

                        y = RND * 14
                        COLOR y
                        NEXT x

                        Comment


                        • #13
                          Some people just don't like to help around here.. Calm your ego's. If you have the skills to program plus you want to help out making events for this game, you would help this guy out. Period.
                          ▒█░▄▀ █▀▀█ █░░█ █▀▀▄ █▀▀ ▀▀█▀▀ ░▀░ ▀▄▒▄▀
                          ▒█▀▄░ █▄▄▀ █▄▄█ █░░█ █▀▀ ░░█░░ ▀█▀ ░▒█░░
                          ▒█░▒█ ▀░▀▀ ▄▄▄█ ▀░░▀ ▀▀▀ ░░▀░░ ▀▀▀ ▄▀▒▀▄

                          Comment


                          • #14
                            the only reason rhino is taking compy sci is so he can get staff as a bot coder....durrr

                            Comment


                            • #15
                              Indeed give the piece 2 coordinates. A xCoord and yCoord. Initially both coords are 11, as the bord is 11x11.
                              Then just make a method move();
                              As it can only move 1 box a time you don't need to give arguments with it.
                              The draw() is useless, as you can do a repaint(); in your move() method.

                              Just change the coords in the draw() method. Think of something so that it first xCoord = xCoord - 1; a few times first to move it to the left. Then yCoord = yCoord - 1; etc ... Could do it with a click counter, but there are better ways.

                              In your paintComponent(Graphics g) method you just let it draw the piece on the specified coordinates. Pretty easy.

                              Then you can just put the buttonHandler on it so it'll do piece.move(); and it's all fine.
                              TW Web Developer

                              4:vys> yo
                              4:vys> 1 day ill be staff
                              4:vys> know it for sure
                              4:vys> yo P_L already told me that i'd be ZH one day when deluge is sys op and method owns TW

                              2:money> zazu got zizu'd when he should have zizzo'd

                              3:Lizard Fuel <ER>> !tell stop meeting girlfriends on subspace, who are you, hurricane?
                              3:RoboHelp> Told moth about stop meeting girlfriends on subspace, who are you, hurricane?
                              3:Lizard Fuel <ER>> oh sht

                              Comment

                              Working...
                              X