[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
AI Challenge Forums • View topic - [C#] Create a copy of the map

It is currently Sat Jan 20, 2018 8:52 pm Advanced search

[C#] Create a copy of the map

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

[C#] Create a copy of the map

Postby Savaron » Wed Feb 10, 2010 1:46 pm

Hi, I'm about to implement my move-Tree, but I struggle with the representation of the map. With this copy I want to make the last move, so my GetValidMoves-Function won't include the last visited square as this is not a wall in the actual representation.

I'm not experienced enough to see what I'm doing wrong here, can someone please push me in the right direction?

Thanks
Savaron
Captain
 
Posts: 22
Joined: Tue Feb 09, 2010 10:32 pm

Re: [C#] Create a copy of the map

Postby Queue29 » Wed Feb 10, 2010 2:44 pm

You could explicitly say mymapobject[Map.MyX()][Map.MyY()] = '#' after copying the map.
Queue29
Lieutenant-Colonel
 
Posts: 41
Joined: Sat Feb 06, 2010 5:43 am

Re: [C#] Create a copy of the map

Postby Savaron » Wed Feb 10, 2010 4:32 pm

Yeah, but how do I copy it? SetWall(x,y) is fairly easy to implement.
Savaron
Captain
 
Posts: 22
Joined: Tue Feb 09, 2010 10:32 pm

Re: [C#] Create a copy of the map

Postby ohmusama » Wed Feb 10, 2010 6:01 pm

ohmusama
Cadet
 
Posts: 3
Joined: Sun Feb 07, 2010 6:08 pm


Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron