Skip to content

Create a PowerShell script that asks the user: What is my favorite color? This is a game where the user guesses the script’s favorite color. The game will keep track of game stats and allow for repeated play.

License

wantingchen0852/powershell-color-guess-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

PowerShell Color Guess Game

An interactive PowerShell script that demonstrates secure input handling, enum parsing, hints, attempt tracking, and timing—useful foundations for defensive scripting in cybersecurity labs.

How to Run

pwsh ./ColorGuessGame.ps1

## Features
Validates user input via [System.Enum]::TryParse
Commands: List colors, Hint, Wrong guesses, Quit
Tracks attempts and total time
Handles Dark* color hint logic (e.g., DarkG for DarkGray)


## Cybersecurity Relevance
Demonstrates defensive scripting and input validation
Builds automation and logic-control skills
Serves as a base for secure PowerShell tools

About

Create a PowerShell script that asks the user: What is my favorite color? This is a game where the user guesses the script’s favorite color. The game will keep track of game stats and allow for repeated play.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published