From 2ddce5727193d0fb2dca15746c6d303429ea6087 Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Sun, 18 Sep 2022 16:25:59 -0600 Subject: [PATCH 1/3] Add readme explanation --- README.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c46716f..954349a 100644 --- a/README.md +++ b/README.md @@ -1 +1,35 @@ -# coding-assignment-iam \ No newline at end of file +# Rock Paper Scissors Game + +## Stack + +I used uvicorn + FastAPI for the backend, and simple JS + HTML + Bulma +CSS for the frontend. + +## Accomplished + +I was able to get the backend mostly done and added the initial page for +the frontend. A game is able to be created, saved, and loaded. A basic +game page exists, but just notifies the player of who is playing. If the +player 2 field is left blank, a player named CPUPlayer is created. + +## Further Improvements + +If given more time, I would have liked to explore creating the full game +UI and revise my design as needed. The main game would have been played +on the frontend, with just the score being tracked on the backend. This +is the design I went with, so no game logic actually exists. + +I thought it would have been cool to use websockets and allow a player +to use a game code from a separate window or computer on the same +network to make a simple online multiplayer version. This would be more +fun since the second player wouldn't be able to see the other's screen. + +The saving mechanism could be improved with an actual SQL/Mongo or +equivalent server. Pickle is generally unsafe because it can cause +remote code execution vulnerabilities, but it was used to save time. + +It was my first time using FastAPI, so there are likely multiple style +and usability improvements that could be utilized with more time. + +Better UI outline and arrangement could also be done, but is limited by +my design skills. I would probably enlist a designer to help with that. From c233dfb9d77fdf5004ebc2a6a43d01af52f1b631 Mon Sep 17 00:00:00 2001 From: Joey Date: Sun, 18 Sep 2022 16:31:30 -0600 Subject: [PATCH 2/3] Update with run instructions --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 954349a..1e92fa8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,15 @@ # Rock Paper Scissors Game +## Instructions + +```bash +python -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt + +uvicorn app.main:app --host 0.0.0.0 --port 8080 +``` + ## Stack I used uvicorn + FastAPI for the backend, and simple JS + HTML + Bulma From d1bfd80f48fc650c37a491f96dafcd181e4922f1 Mon Sep 17 00:00:00 2001 From: Joey Date: Sun, 18 Sep 2022 17:08:51 -0600 Subject: [PATCH 3/3] Update with one more improvement. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1e92fa8..50fd201 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,7 @@ and usability improvements that could be utilized with more time. Better UI outline and arrangement could also be done, but is limited by my design skills. I would probably enlist a designer to help with that. + +I could have added a one time public/private keypair for signing and +validating the post requests so that you can't just increase your own +score by using fabricated post requests.