darkagn 315 Veteran Poster Featured Poster

RTS = Starcraft. 'Nuff said.

Hi Infarction and thanks for the input to this discussion,

I agree that Starcraft is a fantastic RTS, but the reason why I included Warcraft in my original list and not Starcraft was that I thought that Starcraft was pretty much the same game just with slight variations for Sci-Fi as opposed to Fantasy.

darkagn 315 Veteran Poster Featured Poster

Ok I don't want to give it away, but the line

String "type";

is not how you initialise a String. And it is in the wrong method.

You have moved the line

Triangle T = new Triangle();

from where it should be to the wrong place. I sugeested earlier that you need to modify this line, not move it.

darkagn 315 Veteran Poster Featured Poster

Also, in Employee's constructor you set the variable emp to the String paramater, but Doctor gets a name varaiable set. Is this correct?

darkagn 315 Veteran Poster Featured Poster

Yes, instead of Object job; put Employee job;

This will allow you to create any Employee or child-class. This is called polymorphism and is a fundamental concept of Object Oriented programming. Google 'polymorphism in java' for more info.

darkagn 315 Veteran Poster Featured Poster

You still haven't initialised the variable 'type' before you use it in the getType() method.

The line:

Triangle t = new Triangle();

is calling the wrong constructor (I think). Add three double parameters to this call.

darkagn 315 Veteran Poster Featured Poster

I'd actually nominate Dune 2 as the most influential RTS; although TA brought 3D to the table.

Others that would be on my list are:

Civilisation
Super Madio Bros
Sim City
Mario 64
Elite
Tetris
Dragon's Lair
Doom
Half Life
The Legend Of Zelda: Ocarina Of Time

I realise that many of these aren't the first of their genre but they are the ones that stand out

I forgot the Simulation genre, of which SimCity would certainly be the forerunner. And Civilisation was certainly a good call for the Turn-based Strategy genre.

THE most influential game of all time must be the original Pong.

For RTS games, the most influential ever is Total Annihillation. It redefined the genre when it was released in 1997 (I believe it was, maybe late 1996) and set the standard to which RTS games are measured to this day.

Yes, I forgot TA so that's fair. Along with Pong, perhaps Space Invaders?


Also, I forgot the MMORPG genre. I haven't really played any in this category, but may I suggest EverQuest and World of Warcraft?

darkagn 315 Veteran Poster Featured Poster

If you want to get technical than you could say, Asia and Africa connected together, is (it is a single landmass so I am using "is" not "are") the largest island in the world because it is technically surrounded by water on all sides.

But it is made up of many countries, none of which are an island. Australia is a single country made up of one main island, a smaller island and several tiny islands.

darkagn 315 Veteran Poster Featured Poster

Hi all,

I was wondering what everyone thought were the most influential computer games of all time? It doesn't matter what platform, but I thought I'd break it down into genres, so here are some that I thought might be considered:

First Person Shooter: Unreal Tournament / Doom
Real Time Strategy: Warcraft / Age of Empires / Command & Conquer
Turn-based Strategy: Heroes of Might and Magic
Role Playing: Diablo / Baldur's Gate / Elder Scrolls
Racing: Gran Turismo / Mario Kart
Action / Adventure / Puzzle: Impossible Mission / Broken Sword / Myst
Sport: EA's FIFA Soccer
Platform: PacMan / Donkey Kong / Super Mario Brothers
Fighting: Mortal Kombat / Street Fighter
Horror: Resident Evil / Silent Hill
Crime: Grand Theft Auto

Any thoughts, comments or suggestions?

darkagn 315 Veteran Poster Featured Poster

Because you have not initialised i in that method. You do in the method before it, but i is outside that scope when you actually use. Also, the same can be said for the variable z.

darkagn 315 Veteran Poster Featured Poster

Well for starters you are calculating the area and perimeter of a circle rather than a triangle. Not that you are actually calling these methods though.

Also your OR and AND statements in the if-statement in your getType() method needs || and && rather than | and &. And you need to initialise the variable 'type' before you use it.

Your call to the constructor for Triangle needs three double paramenters.

darkagn 315 Veteran Poster Featured Poster

Yes but the mainland is an island - the biggest in the world.

darkagn 315 Veteran Poster Featured Poster

Hi jwentig,

I always find your comments interesting and I respect your ideas, but I would like to comment if I may on what you've said.

Kyoto will have NO effect on the "climate" whatsoever with or without the US.

US CO2 emissions (which is what Kyoto is all about and which are utterly pointless when it comes to "the climate") are DOWN and have been going down for several years now despite (or more likely because of, given what's happening in countries which did sign up) the US not signing on to the economic suicide pact that's Kyoto.

Scientists the world over agree that CO2 emissions are the driving force behind global warming, a scientific theory that has yet to be disproven.

Kyoto will cripple economies right at the time when they could do so much to reduce polution. That's because only economies that are strong can do anything to reduce polution and Kyoto is designed (that's its entire reason for being) to destroy economies.

Actually I think the problem here is that the Kyoto Agreement did not take economic factors into account, but it certainly was not designed to cripple the world's economies. It was designed to have a global effort to affect the way in which we rely on fossil fuels and specifically how the use of these fuels is compounding the problem of climate change. After all, without a global effort how can we get such a global issue to fruition?

If …

darkagn 315 Veteran Poster Featured Poster

I like the solved threads count. But maybe as a compromise the moderators/administrators of daniweb could have this info removed from their profiles? After all, they are moderators so we all know how good they are ;)

~s.o.s~ commented: Saves us all the embarrassment, eh? ;-) +20
darkagn 315 Veteran Poster Featured Poster

From what I've heard, the Kyoto agreement would have little effect on actual climate. The main result would seem to be that any country which attempted to abide by it would watch their own economy plummet. Most of Europe, for example, doesn't seem to be doing to well according to Kyoto standards.

Actually my point was that the Kyoto Agreement will have little effect on climate change without the US. :P

And on the topic of economics, things like energy costs might rise, but what other economical effects could occur? I have never really understood the argument that economics relies upon the burning of fossil fuels. And in fact from what I've read, the US economy is in worse shape now than it has been in over 20 years due to the practice of predatory lending and credit card debt.

darkagn 315 Veteran Poster Featured Poster

On the topic of climate change, Australia's new Prime Minister, Mr Kevin Rudd, has promised to ratify the Kyoto Agreement as one of his first orders of business. This means that the US is the only developed nation to refuse to sign. What is truly ironic is that the US produces roughly 30% of the world's CO2, so without them the agreement is pretty pointless. It's like trying to optimise an algorithm but leaving 30% of it as is. :P

darkagn 315 Veteran Poster Featured Poster

I'm not sure about source code, but you might find some algorithms by searching in google.

darkagn 315 Veteran Poster Featured Poster

Ah I just realised that you are not actually calling the eatDot() method anywhere in your code. I think it should probably be called immediately before the call to repaint()...

darkagn 315 Veteran Poster Featured Poster

Ah yes Ezzaral is correct - sorry for that :$

darkagn 315 Veteran Poster Featured Poster

Set the text for a JLabel at the bottom of the GUI to be the following String:

java.util.Date currentDate = new java.util.Date();
String date = currentDate.toString();
darkagn 315 Veteran Poster Featured Poster

I'm sorry jackskell26, I can't see what's wrong. Maybe someone else can help.

darkagn 315 Veteran Poster Featured Poster

Sorry, I just editted the post above to include a check for whether the dot is eaten. It's been added the if-statement you wrote before.

So in your paint method you would write something like:

if ( ! dot[i].isEaten() ) {
// paint the dot
}
darkagn 315 Veteran Poster Featured Poster

I would do something more like this:

public void EatDot() {

  for (int i=0; i < dotct; i++) {
 	if ((xcoords - dot[i].x <= 5) && (ycoords - dot[i].y <=5) && !dot[i].isEaten()) {
                dot[i].setEaten(true);
         }
  }
}

Also, you only want to eat one dot at a time. And you might need some sort of abs function (see Math.abs in java documentation) for your checks in the if-statement.

darkagn 315 Veteran Poster Featured Poster

You know pacman's coordinates because you draw him. The Dots are drawn at the start so you know their coords as well. A simple method to check whether the nearest uneaten Dot is within 5 pixels of pacman should do the trick.

To Do:
-- find nearest Dot to Pacman's current coordinates
-- is this dot eaten?
-- if not, is this Dot's coords close enough to eat?

darkagn 315 Veteran Poster Featured Poster

I think I would do something like this in your Dot class:

private boolean eaten = false;
// call this next method to set the Dot to eaten
public void setEaten(boolean beenEaten) {
eaten = beenEaten;
}
// call this next method to check if the Dot is eaten when drawing it
public boolean isEaten() {
return eaten;
}

Then in your main class, you need a method to check whether pacman is close to not eaten dots and set to eaten if he is. In your paint method you need to check whether each Dot is eaten before drawing it.

darkagn 315 Veteran Poster Featured Poster

I'm sorry hidash_in but this is the second time you've posted this question and I'm still not sure what you are trying to do. Do you mean that you want a program written in java that opens another application (like word) and then quit the original java program? If that's the case then I don't really understand the point...

darkagn 315 Veteran Poster Featured Poster

The Oxford Dictionary defines racism as:

1 a a belief in the superiority of a particular race; prjudice based on this.
b antagonism towards other races, esp. as a result of this.
2 the theory that human abilities etc. are determined by race.

IMHO Josh's discussion, entitled Race and Intelligence is racist according to 2 above. I find this discussion inherently offensive and find it distasteful that the administrators of daniweb have not closed it.

darkagn 315 Veteran Poster Featured Poster

Ah good point jwentig

darkagn 315 Veteran Poster Featured Poster

Australia, but not Sydney or Melbourne, which tends to be the only two places anyone outside of Australia knows. Adelaide is the capital city of South Australia, the dryest state of the dryest continent in the world. It's probably why I have such a dry sense of humour...

ive heard of it

Sorry, I did not mean any offence, merely saying that not many people have heard of Adelaide. People that follow cricket or cycling may have though, and occasionally people might say that they have family in Adelaide (particularly people from the UK :) ) Also we're pretty well known for our wine regions in South Australia.

Anyways that's enough of a ramble about SA. I should get a job for the tourism board :P

darkagn 315 Veteran Poster Featured Poster

This link (thanks to Ezzaral) contains a pretty good run-down of what you need to do to implement an Applet. Take a look and if you are still having problems post again with some information about where you are having trouble.

darkagn 315 Veteran Poster Featured Poster

Why do game developers put the option to cheat in their games anyway? To me it seems like a pointless exercise to play a game and cheat while doing it but maybe that's just me...???

darkagn 315 Veteran Poster Featured Poster

Here they are: THE ANSWERS:

19. What is the largest island in the world?

Greenland.

Australians are very proud of the fact that our mainland is roughly three times the size of Greenland and is in fact an island, being completely surrounded by water. Greenland is the second largest island in the world.

darkagn 315 Veteran Poster Featured Poster

Ahhh the sega megadrive!! I loved sonic the hedgehog :D

darkagn 315 Veteran Poster Featured Poster

Greetings fellow Australian. I too am interested in GUI design, although for me it is "Java or bust". I have dabbled in C++ but I find its nuances a little strange :S Anyways nice to meet you and hope to talk to you soon in DaniWeb!

Cheers
darkagn

darkagn 315 Veteran Poster Featured Poster

Hi Black Box,

I've read a few of your posts and am impressed with your knowledge (of Java particularly).

Cheers
darkagn

darkagn 315 Veteran Poster Featured Poster

I've been thinking about this since my last post when I was in a bit of a hurry...

Not only AstroBoy, but also Battle of the Planets (G-Force?), TMNT, Batman, XMen, Speed Racer, Transformers, Masters of the Universe, Scooby Doo and Charlie Brown.

darkagn 315 Veteran Poster Featured Poster

Not to mention this thread was nearly 18 months dead. If you need help, please start a new thread rather than resurrecting something so ancient...

darkagn 315 Veteran Poster Featured Poster

Australia, but not Sydney or Melbourne, which tends to be the only two places anyone outside of Australia knows. Adelaide is the capital city of South Australia, the dryest state of the dryest continent in the world. It's probably why I have such a dry sense of humour...

darkagn 315 Veteran Poster Featured Poster

Hi piers,

The problem is that you posted a huge chunk of code that any of your fellow students could copy easily by searching for "scanner" in google. I think that is what the person is implying (possibly one of your professors?) Next time maybe just post the relevant code?

darkagn 315 Veteran Poster Featured Poster

Well said, Black Box.

I will just add to what you've said by saying too that the hardest programming language to learn is the first. A problem solved in the first language will be similar in another, although syntax might differ slightly. I personally believe that Java is an excellent starting point for the would-be programmer, because it introduces concepts such as classes and objects and the descriptive compiler error messages help to show you exactly where your errors are in your code.

I would only really call myself an intermediate-level programmer having only graduated last year and with only a small amount of commercial experience, but I am always leaning new things. That's part of the fun and intrigue of the industry!

Anyway I'm going to sleep now as it is late here in Australia. I hope I have pointed you in the right direction newbieGirl :)

darkagn 315 Veteran Poster Featured Poster

Don't be too hard on yourself - you're doing just fine. In fact you've almost solved it. There are only a couple of things missing from your program. I don't want to give it all away, so I will repeat Black Box's question - what should happen when n % i = 0? ie what should you put in the if-statement? Start by initialising the variable countOfFacors immediately before the if-statement (should it be a double, String, int or something else and what value should it start with if any?)

The main method is where you should output your results but again I'm not going to tell you exactly how to do this because I think you know about output from another thread...

darkagn 315 Veteran Poster Featured Poster

I'm pretty sure this should work:

char c;
cin >> c;

I haven't tried it, but it only allows for a one character input I think...

darkagn 315 Veteran Poster Featured Poster

AstroBoy!!

darkagn 315 Veteran Poster Featured Poster

The first thing you should do is work out EXACTLY what you want your program to do. Your explanation is still a little "fuzzy" on the details (pardon the pun!) Then go through and find all the unique nouns (things) in your detailed description - this will give you a rough idea of the classes you will need. The interaction beween the items in your description gives a rough indication of the methods you will need.

That should do for a start. Don't be afraid to spend a long time on writing out the description and getting to the "nuts and bolts" of the problem, as this will save you countless hours later on.

Cheers
darkagn

darkagn 315 Veteran Poster Featured Poster

Hi newbieGirl,

Also in another of your threads you output "yes" to the console, but your program here doesn't output anything. This makes it difficult to see what is happening in your program ;)

darkagn 315 Veteran Poster Featured Poster

First, move the calls to numFactors to your main method. Second you need to implement the numFactors method which you can do by

for (int i=1; i<=n/2; i++) // since any num > n/2 is not a factor
{
    if (n % i == 0) {
         // i is a factor of n!
    }
}
return countOfFactors;

The % operator is modulo arithmetic. A factor is any number that the number is divisible by (ie mod = 0).

Hope this helps,
darkagn :)

darkagn 315 Veteran Poster Featured Poster

You will need a pretty good understanding of how to use I/O in java to do this assignment. Take a look at the java API in the java.io package and I'm sure there are some tutorials on the sun website about I/O. The rest of the program is just a series of if-else statements.

Have a try and if you are still having problems post some of your code for us to have a look at. We can then try to steer you in the right direction. :)

Cheers
darkagn

darkagn 315 Veteran Poster Featured Poster

Hi hassanalvi1989,

welcome to DaniWeb. What language were you thinking of doing this in? Have you done anything so far that we can comment on? What AI principles will you use?

Cheers,
darkagn

EDIT: Sorry, I didn't look at the title. C++ is your language of choice?

darkagn 315 Veteran Poster Featured Poster

A mouse listener can provide you with the x, y coordinates when the mouse is clicked and you can use these coordinates to check against your map to see which division was clicked on.

darkagn 315 Veteran Poster Featured Poster

What was the teacher's explanation?

darkagn 315 Veteran Poster Featured Poster

A Lizard is a Reprtile which is an Animal. Therefore, a Lizard is an Animal. So I would say yes to your question. If you disagree, please discuss.