My C++ programming group have to create a Bid Whist Card game program, and we need to create pseudocode for it? We need some serious help!!! How do we get started?
Bid Whist Program
Collapse
X
-
I thought you were creating pseudo-code. Not C++ code. I don’t know what your level of C++ is though. I assume you’re familiar with basic things like how to use vectors and C++ strings. You know all the basic flow control statements, the loops and if statements and what not. Are you familiar with structures and classes? Templates?
There’s no one way to approach converting a system into actual code, and whole books and papers are written on how to do it. Your most likely expected to come up with something simplistic (i.e. just a quick sim of the game).
Personally, I look to look at things from a black box approach. First imagine (or draw) a big box. There’s inputs to the box, and outputs. What are your inputs for the program, and what does it output? Then break this box down into slightly smaller boxes and repeat on a slightly more indepth scale.
Take for example, a calculator. The biggest box is the calculator, which has as an input, two numbers and an operator like addition, subtraction, etc. The output is the result of the calculation.
The bigger box can be broken down into five modules. Four of them deal with addition, subtraction, multiplication, and division. The fifth one takes the inputs, and decides which of the four operations deal with the inputs. Then it shows the result from the appropriate one.
There’s several aspects you look at, but for something this simple, I think this black box approach works fine.
You don’t have to use it if it’s confusing. Point is, try to take the biggest thing you can understand, and break it down into slightly smaller components you can figure out. With the game, you can break it down into components that represent various aspects of the game. The initial setting up the cards. Then dealing them out. Then repeatedly playing. Then scoring in the end. Then break it down further.
If you’re having trouble figuring out how to write this in code, you need to tell us what you’re thinking. Otherwise, all we can do is give away the answer to you. But obviously we won’t do that.Comment
Comment