Project 1: Basic PHP Application - Game simulator
For this project you will build an automatic game simulator.
Most games will pit a Player A vs. a Player B. More players can be added if necessary. There will be no input from the user. Game play will be influenced by random choices and pre-programmed strategies.
Examples & Ideas
- Coin flip (Beginner)
- Rock Paper Scissors (Medium)
- War (card game) (Advanced)
- Dice games
- Drawing straws (ref)
- Matching pennies (ref)
- High-low number guessing game
- Tic tac toe
- You can use any of the game example/ideas I listed above except for Coin flip (this will be used as an example in lecture). Alternatively, you can use another game of your choosing.
- Your game must not accept any input from the user.
- The page must explain the mechanics of the game. Especially be sure to include details if a step in the game differs from how the game is actually played in “real life”.
- Pick a game that is proportional to your comfort level with the material thus far.
- Always start by building the MVP - Minimum Viable Product - i.e. the simplest, working version of your game.
- If you start off with a simpler game and things go smoothly, you can always build a second, more complicated game.
- It’s okay to simplify certain game mechanics (e.g. using a “deck” of cards with no face values).
- Time permitting, you can add extra challenges, e.g.:
- Run the simulation multiple times, reporting on the results of each round and the final winner after x number of rounds (similar to the War game example above).
- Fleshing out challenging game mechanics you simplified in the first pass.
- Build your project in your e2 repository under a subdirectory called p1.
- Your project must be accessible on your server following the URL convention of http://e2p1.yourdomain.com.
- Your project must be set up to run as an independent application with its own document root; it must not run as a subdirectory.
This project will be submitted/due with your Week 5 assignment (due Tue Oct 10 @ 11:59pm Eastern). In that assignment I will have prompts asking you for your submission URLs (Server URL, Github repo URL, URL of last commit).
All final commits should be made before you submit your Week 5 assignment. Small commits made after the assignment deadline (e.g. a small bug fix, a typo correction, etc.) will be considered when grading, but any notable commits will not.
- Your project must include a README.md file using this template...
- Put your README.md file in the p1 application root (i.e. /e2/p1/README.md)
- Use proper Markdown syntax.
- All links must be clickable.
- For outside resources, do not include course notes or examples, but do include any/all of the following:
- ChatGPT/AI prompts (you do not have to include the answers, only the prompts)
- External blogs/tutorials/books
- Specific forum posts (e.g. StackOverflow)
- Sources for images that you did not create
- Outside resources such as CSS frameworks, Google fonts, etc.
- Anything else (if in doubt, cite!)
- Use modern and semantic HTML. CSS is optional but a minimal amount of CSS is suggested to present a clear and clean interface.
- Code should be organized and easy to follow.
- Code should be accurately indented with consistent spacing, styling, and syntax.
- Any non-obvious lines of code should be commented.
- Any extraneous code (including old, commented-out code) should be removed before submission.
- Code should follow all best practices discussed in lecture/notes.
You are encouraged to post questions about this project/your code in the forum. You are also encouraged to utilize the PHP documentation, Google, StackOverflow, etc. to assist with project development and troubleshooting.
Be sure to read the course policy on original work and academic integrity to make sure you are responsibly using outside resources and getting the most out of this project.
It is expected that projects will follow all best practices discussed in lecture/notes, even if they are not explicitly mentioned in the specifications above. Failure to do so may result in point deductions.