Please see the comments to the comments to the question, by Matt T Heffron and myself. Essentially, this is the answer.
The skeleton of your code should be something like
static void Main() {
Game game = new Game();
Game.Introduction();
Game.DisplayBoard();
while (!Game.Finished) {
Game.Step();
}
}
Here, you can see one suggestion: use OOP, define some non-static class
Game
; don't try to develop all in one class. This is not required, but would make your work more comfortable for you. The main loop is usually also should be in the same game class; I've shown it separately just to show the look of the mail loop.
Some more moments:
Don't use
Console.ReadKey();
use
Console.ReadKey(true)
instead. This is all the console input you would need. You won't really need
Console.WriteLine
or
Console.Read*
at all (except, perhaps, introduction). You will soon see it yourself, so it's better to understand it from the very beginning. You will need output to a location of screen, so you will need
Console
members
Cursor*
and
Window*
, and some more. Please see:
Console Class (System)[
^].
You will have to experiment with those members to achieve pseudo-graphical output. But that said: even a simple board game on a console doesn't look serious. It's very likely that the GUI application would be easier (and of course look and behave much better), especially with WPF and its
Canvas
class. However, if you want to practice with console, it could be an interesting exercise.
—SA