Lost Password?


Go Back   CodeCall Programming Forum > Software Development > Java Help

Java Help Java Help forum discussing all Java platforms - J2ME, J2SE and J2EE - as well as relevant standards, APIs and frameworks such as Swing, Servlets, JSPs, Applets, Struts, Spring, Hibernate, ANT, EJB, and other Java-related topics.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-06-2006, 01:29 PM
yogiman22 yogiman22 is offline
Newbie
 
Join Date: Dec 2006
Posts: 2
Rep Power: 0
yogiman22 is on a distinguished road
Default Help With Game of Life program

Hi all,
I'm working on a program that simulates Conway's Game of Life. I have the GUI code and i'm now working on a class that has the methods to fully run this method. I'm stuck on a few of the methods. please respond if you can be of any help.
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 12-06-2006, 01:44 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,650
Last Blog:
PHP Objects, Patterns,...
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

Hello and Welcome. What do you need help with?
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-06-2006, 01:58 PM
yogiman22 yogiman22 is offline
Newbie
 
Join Date: Dec 2006
Posts: 2
Rep Power: 0
yogiman22 is on a distinguished road
Default

I'm trying to write three different methods. a changeCell method which places a cell in the square at that row and column if it is empty.
Row and column should be specified using 0-based indexing. changeCell(0,2) would place a cell in the 3rd position of the top row. If there already is a cell in that location, that square should be made empty instead.

the other is an update method that updates the society to the next generation according to the rules specified above. In addition,
this method should return a boolean indicating whether there was a change from the previous generation, false if no change, true otherwise.

you are familiar with the game of life yes?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-06-2006, 02:17 PM
TcM's Avatar   
TcM TcM is offline
Code Warrior
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,332
Rep Power: 68
TcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of light
Default

I can't actually help you because I don't know JAVA
But here are 2 codes that might help you?
Attached Files
File Type: zip GameOfLife.zip (40.5 KB, 48 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-07-2006, 12:50 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,418
Last Blog:
wxWidgets is NOT code ...
Rep Power: 37
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default

It's kind of tricky to help without knowing the basic logic you have in mind. There are a few ways you can be modeling the game, and not knowing the model makes it harder to help you finish. Also, you may need to change your model if it seemed easy but is actually making it harder to finish.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 11-11-2007, 01:30 PM
affe affe is offline
Newbie
 
Join Date: Nov 2007
Posts: 1
Rep Power: 0
affe is on a distinguished road
Default

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-06-2008, 11:26 AM
RSpades RSpades is offline
Newbie
 
Join Date: Feb 2008
Posts: 1
Rep Power: 0
RSpades is on a distinguished road
Default

Very useful information! Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a card game (multiplaye online with AI).. what do I program this in? anothersoldier General Programming 1 07-19-2007 07:46 AM
Can someone help me with this code for the Game Of Life njod C and C++ 2 04-11-2007 12:39 PM


All times are GMT -5. The time now is 11:52 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads