• entries
132
99
• views
88958

# Code refactored, hilarity ensues

66 views

So, our Game class teacher gave us a list of suggestion that he'd like to see in our game. Nothing major, just some small changes...

...that require me to rewrite the entire AI system.

It's not as bad as it sounds, the AI system in place was in dire need of a rewrite anyway, and the new game play will be considerably easier to write an AI for. Still, it's going to be a long weekend.

You know what keeps me motivated to work on my school game? The hilarious shit I find in my teammates code when we have to refactor. Some gems I cam across today:
int i = 0;//C++ is the stupidest language ever...//Can't just do a simple memcpy with class dataColor* new_colors = new Color [length + 1];for (i = 0; i < length; i++)	new_colors  = chat_string_colors ;new_colors [length] = c;delete [] chat_string_colors;chat_string_colors = new_colors;

So I guess if C++ is the stupidest language ever, everyone who uses it must be an idiot? If you want to be intelligent, use C! Bullocks to this new-fangled C++ mumbo jumbo!

/*The STL is the worst thing in historyInstead of simply doing one add and one multiply toget to a location in memory, I have to do this crap...*/unsigned int grab_index = atoi (recvPacket.strings [0]);						Dandellos_iter d = new_Dandes.begin ();for (unsigned int i = 0; i < grab_index; i++)    d ++;new_Dandes.erase (d);

So many things about this crack me up. It goes without saying that here is someone who does not have the faintest idea how to use the SC++L, yet feels qualified to bash it. But I think what gets me the most is that currently we are using a linked list to store Dandellos, so even if we weren't using the standard lib, you couldn't get to an arbitrary node by "simply doing one add and one multiply".

[lol][lol][lol]

There are no comments to display.

## Create an account

Register a new account