A Game of WAR Project!
This project is a simplified game of war against a computer!

In my Intro to Computer Science course, I developed a simplified version of the classic card game "War." The game follows the basic mechanics of the original but is streamlined for simplicity and ease of play. In this version, each player (the user and the computer) draws a card from a deck, and the goal is to have a higher card value than your opponent. If the user’s card has a greater value than the computer’s, they earn a point. Conversely, if the computer's card is higher, the computer earns a point. The game continues with each round, keeping track of the score until a set number of rounds is completed.

When you start the game, you’ll be presented with two cards, clearly labeled to distinguish between the computer’s card and your card. Additionally, the current scores for both you and the computer are displayed.

In the "Data Storage" section, you have the option to save and load your local data, which includes both your game scores and setting preferences.

In the settings section, you can customize the game with several options. "Pacifist Mode" changes the rules of the game so that all rounds result in a tie. The "Card Labels" option allows you to see which card belongs to you and which one belongs to the computer before each round. Additionally, the "Max Score Allowed" setting lets you adjust the score limit for the game. By default, the game ends when a player reaches a score of 10, but you can extend this limit by changing the maximum score in the settings.
One of the advanced settings is "Developer Mode". This feature allows you to access a command line. To activate developer mode, enter the password "1234."

After entering the password, you must complete a CAPTCHA to verify you're authorized to enable developer mode. Once enabled, you'll have the ability to modify various game settings, view specific variables, and execute commands that directly influence how the game behaves.
Within the developer mode, several important variables can be used, including playerscore, computerscore, maxscore, and devmodepassword. These variables control the game’s scoring system and the developer mode access password. In addition to these variables, there are also arrays, such as saveData (which stores saved game data) and cardpic (which holds card images). With these, you can view or change the game's core components easily.
There are a number of commands you can use to interact with these variables and arrays. For example, the /variable change [variable] command allows you to modify the value of any variable, while /variable find [variable] helps you locate and display the current value of a specific variable. If you're looking to search through arrays, the /array find [arrays] command will let you find a value within an array. Developer mode also includes several stats-related commands. The /stats [STATS] command displays game statistics, such as total_played suites, roundsPlayed, settingSaves, and averageWins.
Beyond the functional commands, there are a few playful ones available. For instance, the /fliptable command allows you to "flip the table" (a fun way to express frustration), and /ragequit lets you leave the game dramatically.
Additionally, if you forget the developer mode password or need to reset it, you can use the /reset devmodepassword command to restore it to the default "1234."