Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
cant find a pattern to fit neatly - how to make a large number of monsters?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="thufir, post: 598510"] Here's a slightly more fleshed out idea to mull over, coming from the OOP paradigm :) I'm looking into how to make a MonsterMeleeTicker object for each Monster instance. MonsterMeleeTicker.setRate(3) would mean, perhaps, that every three seconds this monster can do one thing, be it fight/flee/boogie. Any pointers on what MonsterMeleeTicker should look like? All criticisms welcome, of course! /////////////////////code////////////////////////// package atreides.monsters; import java.util.*; public class TestDriveMonsters{ private static List<Monster> list = new ArrayList<Monster>(); public TestDriveMonsters(){ System.out.println("TestDriveMonsters.."); }//TestDriveMonsters public static void makeMonsters(){ System.out.println("..makeMonsters"); for (int i=0; i>5; i++){ list.add(new Monster()); }//for }//makeMonsters public static void main (String args[]) { System.out.println("..main"); }//main }//TestDriveMonsters /////////////////////////code///////////////////// package atreides.monsters; public class Monster{ public Monster(){}//Monster public static void main (String args[]) { System.out.println("main.."); }//main }//Monster [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
cant find a pattern to fit neatly - how to make a large number of monsters?
Top