Showing posts with label ASP. Show all posts
Showing posts with label ASP. Show all posts

Thursday, October 16, 2008

Correct Assumptions : More OOP With cards in games

I wrote the last post with out checking out what Micro Soft had to offer. I found that there is a card game starter kit. I downloaded it and began playing with it. I was shocked to see that what I was thinking would actually work for the handling of cards in a game.

The starter kit builds a blackjack game that you should be able to edit and expand. So i began poking around to see what was there that can be used and modded for my needs. I went to the Card Game Framework to see what was there. I found 3 classes (Card,Deck and Hand). These fit my assumptions with minor changes.

Card is built the way I assumed it would be. It encapsulates the values of the suit,faceValue, and isfaceup. This object is just for the play of this card in other collections. The values are set to private readonly fields or public get properties. That's actually good programing as it stops the programmer from attempting to change cards on the fly.

Deck unlike my deck has only one collection. It also has methods for shuffleing that collection.
Also it has a method for drawing a card. I think since black jack doesn't need a discard deck or to shuffle that deck back in those methods are missing. I can use this as an excellent start for my card based game. I can shuffle anything that looks like a deck. These can even be room tiles from games like house on hunted hill or other games with tiles.

Hand is a collection of cards and cantains a number of cards property. It's inherited by blackjack hand and hit has the rules for black jack in that. all this is wrapped by theanother class.

I know I'm on the write path to writing my game. I'm really excited by this and I can add the silverlight bits.

Thursday, July 31, 2008

Cool tools for version control.

I started using version control on my personal projects about a year ago now. I had a hard drive crash and I lost some project that I was working on. I cried, bought a new hard drive, reimaged and started again with the cadveat I'd do better.

So I started doing better my way. I loved subversion since I had to use it at Catalyst. It never messed up a project and it was nice and easy to use. I downloaded Tortiose and found a site to host it for free.

I thought My Version Control was a god send. I was able to tell my client he was important enough to warrent off site back up. I was able to give several other ppl working on the project with me access. they could read the wiki. Yea.. that was a move in the right direction.

At work I have a VSS system to do the source control and it's all nice inside the IDE. I never really liked it but I deal with it. and go and find who has the file locked and IMing them to get out of the file that I need. I remember the senior devs wanted a plugin into the IDE so they can "live in the IDE". I always joke about it not having a roof. Well I went to code camp (Generic name for Philly.net meeting). It was a hands on camp and dude had all kinds of amazing toys. I wanted his toys his Subversion was inside his VS his nunit test thing was inside his VS and I discovered Resharper.

The Anhk Project is that plug in. I added it tonight and I think it's really cool. I coded a bit on my project and it's sweet just what I need right there where I need it. I also added test driven.net and it works well to running unit tests with in vs.

Sunday, June 29, 2008

Board Games to SilverLight.

I've been playing with silverlight and I've come up with the idea that I can make a board game a web game with Silverlight and C#.NET

I love to play games and the new crop of board games out there seem like they may be really cool to do. I wonder if I can pull this off.

Monday, May 26, 2008

Introduction

I'm now a believer in posting what a blog is should be about and give ppl warning before they start reading. I believe this will form a kind of anchor to my writing and will keep me on topic.

This blog is about my computer programing and hardware hacks and other cool tech stuff that I need to jot down. I will not be talking too much about work projects or techinology here. but since work does guide my learning path. I will talk about the stuff I learn and how that's coming along.

Currently I write software in C# and I use the .NET Framework to create web pages and windows applications. I also know about CSS and HTML which can be a rare thing in a windows developer.

I have 3 hardware certifcations. I can do laptop and desktop repairs. so this blog is for me.