Results 1 to 6 of 6
  1. #1
    zenith is offline Member
    Join Date
    Sep 2008
    Posts
    3
    Rep Power
    0

    Default how to create board in java...

    ... good day... i'm a newbie in this forum... pardon if my way of asking is not right...

    ...my professor in one of my computer science subject is requiring us to pass a project written in java... it may either be a game or an application ... and i decided to make "dama" as my project... but i'm having a hard time starting coding... i don't know how to create a board in java... i don't know what will i be needing to generate one... do i need to use an applet (... but i don't know which do i need)?... i really don't know how to create a 10x10 grid and put the pieces in it... (dama... is like chess... the only difference is that... pieces' move is general/the same ... unless a certain condition was matched)... thanks for all the help... God bless...

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    So you want to develop a game as your project.

    First you have to take a decision, either you want to develop as a web based or an application. If you want to develop a web base game you want to learn about applet.

    What ever you work on, better to use swing. Looking at your question, seems to me you never write any such application in Java. So the best thing is do some examples on swing. Best place is the Suns' tutorial.

    See this page.

    Anything you want to know?

  3. #3
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    First of all write the game code,which will work in console and then add JComponents to the game.
    Create two-dimensional array[10][10],and try to find the solution how to place the dama components into the array,then think of the algorithms which will work for each turn of the player,and will update the array.But if you know something about recursion in Java,so it is very helpful for you.

    Two years ago i was also asked to make a Domino and card game,but i used for that Generics.First of all i wrote the classes which which engined the game in console and then used their methods in created Swing classes.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by Eranga View Post
    Please don't the post in irrelevant threads/sub-forums next time. :)
    His post was spam pure and simple. Hope you don't mind, but I deleted it.

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by Fubarable View Post
    His post was spam pure and simple. Hope you don't mind, but I deleted it.
    That's pretty cool my friend. I couldn't found that actually. Thanks for doing that. :)

Similar Threads

  1. how can I draw a board in 2d array?
    By java_fun2007 in forum New To Java
    Replies: 8
    Last Post: 12-28-2011, 06:58 PM
  2. How to create ToolTip in Java 3d
    By roshithmca in forum AWT / Swing
    Replies: 0
    Last Post: 02-04-2008, 07:57 AM
  3. how to create a menu bar in java
    By tommy in forum New To Java
    Replies: 1
    Last Post: 08-05-2007, 08:43 AM
  4. Create a Calculator in Java
    By Albert in forum New To Java
    Replies: 2
    Last Post: 07-04-2007, 09:01 AM
  5. how to create pdf document from java
    By sreedharvlsi in forum New To Java
    Replies: 1
    Last Post: 07-02-2007, 12:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •