Inspiration

This was inspired from a challenge found on Global Hack Week. It was something that was interesting despite being so simple, because I could see there was a lot of possibilities I could work. We chose to use a library called curses for the first time to make it happen.

What it does

Its a very simple and effective rock paper scissors game. You provide your own choice, and the computers generates a completely random response to your move. From there you compete with the computer to determine who is the winner. Using the power of curses, we are able to leverage the terminal to format text in different areas, creating a more visually pleasing UI. The program also keeps track of your highest personal score, persisting it across sessions so that you can compare yourself to your best anytime.

How we built it

We built this program in Python in order to ensure cross-compatibility with all operating systems, as well as ease-of-use. We also made use of Curses to provide expanded functionality to the terminal output process.

Challenges we ran into

A challenge my partner Vanessa ran into was her limited experience with Python as a whole. As a new programmer, she's limited in her understand of how things work and found that sometimes things like curses confused her, although she was eventually able to grasp things.

A challenge I ran into was printing characters via curses. I wanted to create a simple ASCII animation of rock, paper, and scissor gestures, but ran into an issue when trying to reverse the contents. I was unable to determine why curses wasn't spacing each finger correctly, and fearing I'd fall behind the deadline I fully scrapped the idea.

Accomplishments that we're proud of

  • Making use of curses for the first time
  • Snappy and responsive terminal application
  • Using FileIO to save and obtain highscore data between sessions

What we learned

  • How to use FileIO to read and write data into files
  • Taking advantage of curses to provide powerful text capabilities in a terminal environment

What's next for Rock, Paper, Scissors

If we were to remake this project, or even work on improving it in the future, we would probably try to streamline the overall curses rendering into segmented functions, reducing the amount of LOC in the main function. Additionally, we'd probably make better use of classes and spreading out code amongst classes.

Built With

Share this project:

Updates