Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Objects Object-Oriented Programming Fields

Benneth Paredis
Benneth Paredis
4,597 Points

How do i do this in visual studio ?

How do i do this in visual studio and how ?

Steven Parker
Steven Parker
231,271 Points

Do what? Can you elaborate on what you are trying to accomplish?

1 Answer

If you are asking how you might create this game in Visual Studio:

  1. Start a new Console Application project in Visual Studio.
  2. In the main method of the Program class in your new project, write what the teacher put in his public static void Main(string[] args) method. He did this in the game class I believe, but you would do it in the Program class. The Main method is the method that will be called when you press the Start button in Visual Studio.
  3. Set up all of your other classes - your robots and other objects -- then press the Start button in VS.
  4. Wait a few seconds for a console window to appear (if your build was successful and there were no errors) and see if your game simulation worked!