
Journal Journal: Geek conversation on Java and LOTR
[[ORIGINAL COMMENTS HERE:
http://slashdot.org/comments.pl?sid=134407&cid=11220298/ ]]
Re:anywhere that is less expensive (Score:3, Funny)
by struct24 (844801) on Thursday December 30, @06:54PM (#11220298)
* @author Sauron (darklord@darkthrone.com)
*/
package where_the_shadows_lie;
class OneRing
{
Ring elvenKings[] = new Ring[3];
Ring dwarfLords[] = new Ring[7];
Ring mortalMen[] = new Ring[9];
OneRing()
{
Ring.rule(elvenKings, dwarfLords, mortalMen);
Ring.find(elvenKings, dwarfLords, mortalMen);
Ring.bring(elvenKings, dwarfLords, mortalMen);
Ring.bind(elvenKings, dwarfLords, mortalMen);
}
}
-----------------------------------------------
Re:anywhere that is less expensive (Score:2)
by condensate (739026) on Thursday December 30, @07:07PM (#11220425)
You still will have to implement Ring. Then some modifiers should be added, e.g.
abstract class OneRing{...,
private OneRing(){
In that way, you only can derive from it. So no one is going to call this stuff explicitely.
For safety reasons, I suggest you port this to java. Has an authomatic garbage collector if the OneRing Class leaks...
Maybe Sauron should have made better safety assumptions?
--------------------------------------------
Re:anywhere that is less expensive (Score:1, Funny)
by struct24 (844801) on Thursday December 30, @07:48PM (#11220815)
I believe the language that the programmer intends to port this code into is some form of elvish, which I shall not utter here.
---------------------------------------------
Re:anywhere that is less expensive (Score:3)
by Jucius Maximus (229128) on Thursday December 30, @07:41PM (#11220745)
(http://www.getfirefox.com/ | Last Journal: Tuesday November 30, @04:38PM)
(scarcasm) Fool! Any good geek should know that Ring elvenKings[] does not beling to the OneRing class!
The Elven rings are pure and were never touched by Sauron because they were constructed in secret [netscape.com]:
"But Celebrimbor, the greatest of the smiths of the Elves, was distrustful of Sauron, and he forged the three Elven rings, Narya, Nenya, and Vilya in secret from Sauron. And because Sauron never touched these rings, they had no evil in them."
---------------------------------------------
Re:anywhere that is less expensive (Score:2)
by struct24 (844801) on Thursday December 30, @07:58PM (#11220893)
The great is the enemy of the good, and I am a GREAT geek, which is why I knew what was in the next two paragraphs after the one that you quoted:
"But since they were forged with the knowledge gained from Sauron, even these three were subject to the dominion of the One Ring. This ring Sauron forged himself, in secret, in the cracks of Orodruin, Mount Doom. The Ruling Ring, as it was called, had power over all the Rings, and Sauron could see into the mind, and indeed control the thoughts, of any who wielded any of the remaining rings.
So it was, that when Sauron put on the Ruling Ring, the Elves were aware of him, and they took off the Rings which Celebrimbor forged, and used them never again until The One was taken from Sauron."
So there, you fool of a Took!
---------------------------------------------
Re:anywhere that is less expensive (Score:2)
by Jucius Maximus (229128) on Thursday December 30, @08:58PM (#11221460)
(http://www.getfirefox.com/ | Last Journal: Tuesday November 30, @04:38PM)
That doesn't mean that the Elven Rings are in encapsulated by the One Ring class at all! It only means they have protected functions (that really should have been privates,) which are accessible by the OneRing class!