Xecuter 3 Mod Chip | Credit Counseling | Mortgage Calculator | Credit Cards | Loans
source code sites... [Archive] - PCMech Forums

PDA

View Full Version : source code sites...


GSXdan
11-07-2003, 11:02 AM
Does anyone know where i can find source code for a monopoly game(console, not win32)? I want to get an idea as to how the game would be organized and what the structure would be like.

Thankss

doctorgonzo
11-07-2003, 11:42 AM
There are a lot of places you can find source code for Monopoly. Just do a Google search. It looks like most are for Windows programs, though, but they should still be good for non-graphical things, like how to represent things in code.

Also, when you are doing OOP, it is a good idea to just sit down and think over what your object should be before you do anything else like look for code. Think of an actor in the system, then think of the properties that actor has (obviously coded as properties), as well as the things that actor can do (coded as methods).

For example, in Monopoly you have a player. A player has the properties of how much money in its account, its position on the board, and a list of things it owns. So those are pretty good candidates for properties. A player can roll the dice, buy something, or mortgage something. Those are good methods.

OOP requires a lot of thinking before any coding.

GSXdan
11-07-2003, 05:05 PM
Yea we are doing this as a class, not really an assignment. We went over what main classes we need, ie Board, player, game and using inheritance with subclasses. I just wanted to see some structure examples, just see what other people have done.

But yea i was looking and most are for windows, but i might as well take a look at those even though i dont understand any of the windows programming.

THanks

doctorgonzo
11-07-2003, 05:13 PM
I saw one in Java, which should be easy to read. Java and C++ are pretty similar in syntax, especially with regards to classes, inheritance, and so on. At least you can see what classes they think are necessary.

It's located here: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2065&lngWId=2