Chris
|
Update on My Tetris
Posted: Tue Mar 14, 2000 3:06 am
|
For those interested, no I haven't given up on Tetris and no I haven't exactly run into any problems I can't handle. I've been spending the last couple days spending time with family and friends and all today and a bit of last night I've been reading about C++ classes and objects. Honestly, I like this C++ thing a lot. The beauty of being able to place entire functions and variables inside of a structure is a true work of programming art. And Polymorphism (Function overloading) is a time
saver in the least. You can create 30 functions all with
the same name and they will all do what you coded for them.
So, say I create my own calculator program and I need
to add or multiply 2 values? Instead of:
int IntegerAdd(int a,int b)
float FloatAdd(float a, float b)
.
.
etc.
I can have many functions that handle the same type of problem with the same name:
int Add(int a, int b)
float Add(float a, float b)
The only thing I dislike about C++ is that you have to sit down and learn whole new concepts to doing the exact same thing you could possibly do in plain C. For instance...
cout << "Hello, World" << endl;
works exactly like
printf("Hello, World
");
Same purpose, different functions. What's also confusing is this new and delete commands. They allocate memory. Again...
char *b = new char[0x2FFF];
works exactly like
char *b = (unsigned char *) malloc(0x2FFF);
But, at any rate I'm not giving up. I will finish what I started. I learned a new and very valuable motto that will be glued in my head for life:
DON'T EVER GIVE UP!
Chris :o)
|
Chris
|
Short Details
Posted: Tue Mar 14, 2000 3:12 am
|
Key
----
* = I can do
_ = I can't do
----
(*)I can rotate the pieces in memory
(*)I can merge the piece into the map
(_)I can render the memory map into a grid display
(_)I can rotate the pieces and keep them aligned
(*)I can scan the map to check for complete lines
3 down, 2 to go...
Chris :o)
|