This topic is now archived and is closed to further replies.


Wrote a game for everyone who just got out of first semester C++

Recommended Posts

I was just lookin through some old projects and i found this one game that i had written about a week after I finished first semester C++. If you have ever played Drug Wars on the TI-83, it''s basically that rewritten to run in a console, and text based. It is a completely linear program without any classes, only one struct, and just basic data types. Only uses and , and it''s mostly lots of functions and switch statements. It was really a mess, but I fixed it up last night and added about 250 lines of comments. Yeah, it''s kind of long. It''s a single cpp file(it COULD be multiple, but i used way too many global vars for that...take too many extern''s), and it is 1130 lines long at last count. 1130 very simple lines, mind you. I''ll release this as open-source in a few days, as soon as I get it properly cleaned up so that it is nice to read with lots of comments everywhere. It''s not quite ready yet; I''ll post a link here when it is. Hey, so many people asking for a game in basic C++, now I''m giving it to them. Soon I''ll rewrite it in more advanced C++. Hopefully it will operate much more smoothly and be cleaner code. It is really cool though and quite a lot of fun. ----------------------------- The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Share this post

Link to post
Share on other sites