EMBTonkin / DAL9001

It's bigger, it's better, it is probably more likely to take over the world!
0 stars 0 forks source link

DragonTree test troubles #10

Open StrykeSlammerII opened 8 years ago

StrykeSlammerII commented 8 years ago

No idea what went wrong here, but I've got a first draft of Analysis.CanBreed( dragon1, dragon2 ) ...but I'm hitting errors in DragonTree.main in an older test section that used to work:

Dragon derg = new Dragon( lair.getDocument() );
lair.addDragon( derg );

derg.setID( "15" );
System.out.println( "derg ID set to " + derg.getID() );
// search for different ID, should get "null"
derg = lair.getDragonByID( "1" );
System.out.println( "'" + derg + "' should be 'null'" );
// search for same ID, should get the above Dragon
derg = lair.getDragonByID( "15" );
System.out.println( "'" + derg + "' should have ID 15" );

returns

derg ID set to 15
'null' should be 'null'
'null' should have ID 15

Do we just need to add more stuff to the 'test' dragon now, more than just setting the ID? Guess I wasn't expecting it to fail this way, if that was a problem...

( In other news, I've been MIA the past week, but I do have my sleep schedule adjusted to my new work shift... and I'm dual-booting Win10 now so I've spent all my free time in New Vegas and Starcraft2 -_- )

EMBTonkin commented 8 years ago

I'll look into that. I made some changes I have not committed yet that cover a huge range of random stuff, I'll see if anything I did relates. I'll leave a new comment with my results. (Had a job interview this weekend and and now behind on school work. :( )

EMBTonkin commented 8 years ago

So I caught up on school work and was immediately distracted by minecraft, so no worries on your Starcraft absence.

Anyway, I somehow fixed the problem by moving the dragon set ID line above the line where you add the dragon to the tree, so it should be working now (with some bonus invalid image errors, but what can you do?) This must be a weird lingering problem from my last attempt to fix a weird problem where when you add a Dragon to the tree, the Dragon in the Tree is somehow decoupled from the Dragon you added; basically addDragon needs a re-write. I'll get on that as soon as I clean up the mess of code I wrote hurriedly before the job interview.

On another note, I asked the admins a question via the support feature, and the thread got locked. :/ I'm still waiting to hear back from them; in another couple weeks I'll send a follow up. I was pretty sure I had gotten the OK on this project before so once they have time to look at my question the thread should be brought back, but I felt I should warn you this could get shut down. If it does, feel free to leave since you don't actually play FR anymore, though I plan on moving underground and continuing work for my own personally use if not distribution. It's a glorified spreadsheet, after all, and spreadsheets are fine.

StrykeSlammerII commented 8 years ago

finally out of training at work and have decided I should quit playing games for a bit XD any new news on this? The biggest problem I can see would be if you were going to use images from the site..... though as long as the user saves them to disk instead of the program pulling them from the site each time, I thought that should still be ok.

EMBTonkin commented 8 years ago

No news on this yet. :( I still think that once I explain how it works, they will agree it's fine, but just this week one of the admins had to go to the ER with some life threatening condition, so they are probably busy with that.
I have sent a follow up though, so we will see.