Fun With Classes (Hero & Monster Fight)

Here is a quick D&D style game that demonstrates the creation of classes and properties. Then using those properties to pass around to methods and perform different functions on them. Since this was a very simple program with a loop I put the Character and Dice classes into the Default.aspx.cs file. I didn’t see the need to split them out for something so small along with demonstration purposes. I’ll upload another  program later with them split out to show how the OOP nature further. If you goto the live example of this one just keep refreshing the webpage. There isn’t anything intuitive that goes on here. Or just download the source code for yourself.

Keep tabs on next weeks submission. Doing some simple work with class libraries and how you share code across a winform and windows application.

Continue reading

Advertisements

Having Some Fun With Strings

Let’s have some fun with some strings shall we? I decided to see what all I could do while using String.Format(), and StringBuilder(). Also taking advantage of a single dimensional array, char arrays, and string padding. The code may look like it’s jumping around. Like I said I was just doing some messing around. This wasn’t really a project. Just me trying to see what would work and what wouldn’t.

No screenshot for this one. You’ll see the Default.aspx code. It’s self explanatory. 🙂

Continue reading

Basic Slot Machine

This was a challenge topic during a course that I’ve been taking over on Bob Tabor’s LearnVisualStudio.net page. I had a lot of fun with this even in it’s basic nature. It’s using a simple Web Form for a slot machine. Now the graphics aren’t as good as the slots in Vegas. That wasn’t the point of this exercise. Like is said earlier I’m a big fan of going back over past things I’ve learned to see if I missed anything. And to have some fun in this case.

In the past I’ve been making relying on using global variables in my programs. That was just a work around for me being lazy and not passing my variables and values from method to method and doing work on them. So seeing the need to fix this I made that a concentration on this challenge.

Continue reading

Long Awaited Updates

Sorry about the lack of updates here. I haven’t forgotten about this place. I’ve been busy with work and self-study things related to C#. I haven’t really been doing anything post-worthy as of late. Just quick proof of concept code snippets. Basically notes that I make myself via code comments. I don’t think most people will understand what’s going on. If you still want to see it let me know and I’ll post it up.

With that said I’m going to try and keep my updates, for now, to at least once a week. You might see more than one post on a given day of stuff I’ve worked on over the week. You can see updates every Sunday. That has been the day where I’ve had enough time to sit down and review what all I’ve done.

I’ve been doing a lot of review material on things I’ve done. So the posts moving forward might seem to jump around a little. Going from ASP, to .Net, to Web Forms, etc… My learning process involves looking at new things along with going back to what I’ve learned in the past. Sort of a re-review. I’m always finding things that I missed the first time. So I’m a big fan of looking at past material and seeing how to make it better with newly learned techniques. So don’t get too mad at me if it seems like I’m jumping around. It’s just my nature.

So stay tuned.. 🙂