azurelunatic: Vivid pink Alaskan wild rose. (Default)
Azure Jane Lunatic (Azz) 🌺 ([personal profile] azurelunatic) wrote2001-12-18 02:36 pm

Programming....

So we're doing a tic-tac-toe board for our final in C++; yesterday we worked on displaying the board and the element numbers for each square.

I worked out an alternate way of calling the vertical and horizontal line functions than the teacher showed us. The VB teacher taught us that we ought to feel badly when rewriting code over and over, that we should do things differently -- so I worked out a bit of code that I think I could work into a reusable code, the function that I will work up as "Alternate" -- very very simple.

Using Alternate, I did some for-loop indicator black magic and got the element numbers to display without use of static variables that get reset each pass through.

Ron's way works too, of course, but mine is slightly less comprehensible, and more elegant -- mine does it automatically.

Of course, there's probably a reason his needs to work, but I'll still keep that one line in there that's my original thought, and test it each run through to see where it fails.

Magical IDE

[identity profile] spacemummy.livejournal.com 2001-12-19 08:04 pm (UTC)(link)
I guess I just really need a good API, it doesn't have to get all GUI.

Re: Magical IDE

[identity profile] spacemummy.livejournal.com 2001-12-19 09:35 pm (UTC)(link)
Acronyms suck-- I'm being a dork.