Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Game examples implemented as .NET console applications primarily for providing education and inspiration. :)

License

NotificationsYou must be signed in to change notification settings

dotnet/dotnet-console-games

Repository files navigation

dotnet-console-games

GitHub repoLanguage C#Target FrameworkDiscordLicenseTowel

Game examples implemented as .NET console applications primarily for providing education and inspiration. :)

Recommendation
Play the games, pick a game you like, and try to code the game yourself from scratch.

Game*WeightNotes                                                                      
Guess A Number0Play Now Status
Rock Paper Scissors0Play Now Status
Dice Game0Play Now Status
*Community Contribution
Flash Cards0Play Now Status
Quick Draw1Play Now Status
Tug Of War1Play Now Status
Whack A Mole1Play Now Status
Tic Tac Toe1Play Now Status
Simon1Play Now Status
Roll And Move1Play Now Status
Beep Pad1Status
Warning Only Supported On Windows OS
Draw1Play Now Status
Tower Of Hanoi1Play Now Status
Clicker1Play Now Status
Hangman2Play Now Status
Lights Out2Play Now Status
Wordle2Play Now Status
Memory2Play Now Status
Connect 42Play Now Status
Minesweeper2Play Now Status
Wumpus World2Play Now Status
Rythm2Play Now Status
Type2Play Now Status
Drive2Play Now Status
Sliding Puzzle2Play Now Status
Snake3Play Now Status
Word Search3Play Now Status
Hurdles3Play Now Status
Pong3Play Now Status
Flappy Bird3Play Now Status
Oligopoly3Play Now Status
*Community Contribution
Reversi3Play Now Status
Darts3Play Now Status
Yahtzee4Play Now Status
Tanks4Play Now Status
Helicopter4Play Now Status
20484Play Now Status
Sudoku4Play Now Status
Mancala4Play Now Status
Bound4Play Now Status
Tents4Play Now Status
Battleship4Play Now Status
Checkers4Play Now Status
*Community Contribution
Duck Hunt5Play Now Status
*Community Contribution
Blackjack5Play Now Status
Fighter5Play Now Status
Maze5Play Now Status
PacMan5Play Now Status
Gravity5Play Now Status
Tetris5Play Now Status
*Community Contribution
Shmup5Play Now Status
Warning Only Supported On Windows OS
Role Playing Game6Play Now Status
Console Monsters7Play Now Status
*Community Collaboration
Warning Work In Progress
First Person Shooter8Play Now Status
Warning Only Supported On Windows OS

*Weight: A relative rating for how advanced the source code is.
*Community Contribution: Special thanks to everyone who contributed games!
*Community Collaboration: Games where multiple members of the community participated in the development!

You can play the games in your browser:
Play Now
Hosted On GitHub Pages

Local Setup

Clone the repository ordownload the repository and unzip the contents.dotnet-console-games should build with any .NET build process, such as one of the following:

Visual Studio[Expand]

  1. InstallVisual Studio if not already installed.

  2. Open theFiledotnet-console-games.slnf file in Visual Studio.

  3. Run the games with theDebug->Start Debugging (default hotkeyF5) option in the menu strip. You can switch games by right clicking the projects in the solution explorer and using theSet as Startup Project option.

Note This is optional, buthere are some settings you can change in Visual Studio.

Visual Studio Code[Expand]

  1. Install the.NET SDK if not already installed.

  2. InstallVisual Studio Code if not already installed.

  3. Open theDirectoryroot folder of the repository in Visual Studio Code.

  4. Run the games using theStart Debugging green triangle button (default hotkeyF5) in theRun and Debug tab. You can switch games in the drop down next to theStart Debugging button.

Note The following files are included in the repository:

  • .vscode/extensions.jsonrecommends Vistual Studio Code extension dependencies
  • .vscode/launch.jsonincludes the configurations for debugging the examples
  • .vscode/settings.jsonautomatically applies settings to the workspace
  • .vscode/tasks.jsonincludes the commands to build the projects

Note You will be prompted to install the necessary Visual Studio Code extensions when you open the folder:

  • ms-dotnettools.csharpC# support

Command Line[Expand]

  1. Install the.NET SDK if not already installed.

  2. Run the games using thedotnet run --project <PROJECT> command where<PROJECT> is the file path to one of the.csproj files. For example, running thedotnet run --project Projects/Drive/Drive.csproj command from the root of the repository will run theDrive game.

Relevant Articles

Beginner's Guide To Console Input In C#August 1, 2020

dotnet Console Games Tips And TricksApril 7, 2022

Get Involved

Want to show support? You can star the github repository.

Have any questions?Start a new discussion.

Find a bug or have a suggestion?Open an issue.

Want to chat with the developer(s)?Join the discord server.

Want to contribute?Look for open issues you can help with.


Supported by the


[8]ページ先頭

©2009-2025 Movatter.jp