[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - Editing PlanetWars.h/.cc

It is currently Tue Sep 18, 2018 4:19 pm Advanced search

Editing PlanetWars.h/.cc

Code won't compile? Found a bug? Post here!

Editing PlanetWars.h/.cc

Postby Mistmanov » Thu Oct 28, 2010 4:09 pm

Mistmanov
Colonel
 
Posts: 70
Joined: Fri Sep 24, 2010 6:50 pm

Re: Editing PlanetWars.h/.cc

Postby Demerzel » Thu Oct 28, 2010 4:22 pm

i have completely recoded the c++ version, i was initially going to just modify PlanetWars but ran into the same you did -- for whatever reason all the args are hardcoded as consts, i assume this was some cs class i haven't taken since to me there's little benefit to doing so and a lot of annoyance to go back and change it later

got annoyed messing with that so just recoded the whole thing, but to sum it up: almost all the functions are hardcoded as const parameters, which means you can't re-pass them or even do anything other than evaluate them you have to explicitly make a copy

you can
a) mess with un-hardcoding the const parameters on pretty much absolutely everything
b) recode the entire thing

i went with b because i much prefer sscanf / sprintf to the snarl of pseudo-Java Tokenize as implemented in the starter anyway, and i don't have a Fleet class whatsoever since fleets are irrelevant once they're in the air i just update the planetState
Last edited by Demerzel on Thu Oct 28, 2010 4:24 pm, edited 1 time in total.
Demerzel
Colonel
 
Posts: 72
Joined: Sat Oct 02, 2010 6:06 am
Location: themendios at gee mail

Re: Editing PlanetWars.h/.cc

Postby lavalamp » Thu Oct 28, 2010 4:23 pm

lavalamp
Colonel
 
Posts: 56
Joined: Wed Oct 06, 2010 9:10 pm

Re: Editing PlanetWars.h/.cc

Postby Demerzel » Thu Oct 28, 2010 4:28 pm

Demerzel
Colonel
 
Posts: 72
Joined: Sat Oct 02, 2010 6:06 am
Location: themendios at gee mail

Re: Editing PlanetWars.h/.cc

Postby Mistmanov » Thu Oct 28, 2010 4:33 pm

Oh, I do understand them in vbscript now, and it does make life easier, but the road towards it was.. ugh.

I went with C++ because I already had some C experience, so I figured this was the best fit. =) (maybe c# would've been easier? Oh well c++ has worked just fine for me until now -_-)
Mistmanov
Colonel
 
Posts: 70
Joined: Fri Sep 24, 2010 6:50 pm

Re: Editing PlanetWars.h/.cc

Postby Mistmanov » Thu Oct 28, 2010 7:03 pm

But anyway.. reading your replies right, it seems the "best" solution to my problem is "go spend the next week rewriting everything from scratch"?

that's uhm..

yeah. :(
Mistmanov
Colonel
 
Posts: 70
Joined: Fri Sep 24, 2010 6:50 pm

Re: Editing PlanetWars.h/.cc

Postby lavalamp » Thu Oct 28, 2010 7:29 pm

Well, the default PlanetWars class has no concept of the future, so I'm not sure how you're going to do with it what you want.

However, if you feel like attempting anyway, just modify DoTurn to take a (PlanetWars pw) instead of a (const PlanetWars& pw).
lavalamp
Colonel
 
Posts: 56
Joined: Wed Oct 06, 2010 9:10 pm

Re: Editing PlanetWars.h/.cc

Postby Demerzel » Thu Oct 28, 2010 7:29 pm

Demerzel
Colonel
 
Posts: 72
Joined: Sat Oct 02, 2010 6:06 am
Location: themendios at gee mail

Re: Editing PlanetWars.h/.cc

Postby voidptr » Thu Oct 28, 2010 9:35 pm

voidptr
Brigadier-General
 
Posts: 139
Joined: Sun Sep 12, 2010 7:22 pm

Re: Editing PlanetWars.h/.cc

Postby Mistmanov » Fri Oct 29, 2010 2:07 pm

Mistmanov
Colonel
 
Posts: 70
Joined: Fri Sep 24, 2010 6:50 pm

Next

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 2 guests

cron