Skip to content

Rock Paper Scissors app made as part of Develop in Swift Explorations and Develop in Swift AP CS Principles.

Notifications You must be signed in to change notification settings

Swift-Teacher/RPS23

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RPS 👊✋✌️

A single view app that will enable the user to play rock, paper, scissors against the device.

Background 👩🏼‍🎓 🧑🏿‍🎓 👨🏽‍🎓 👩🏻‍💻 👨🏾‍💻

This project is part of Unit 4 in Apple's Develop in Swift AP CS Principles (Teacher and Student) course and Develop in Swift Explorations (Teacher and Student) course. This app starts on page 368 in the student book and covers the Model-View-Controller design pattern and delegation of data models to build the game logic.

I really like this app because it forces students to think about the math behind the game in choices and outcomes.

Purpose 🖥 💻 📱

The general purpose of this project is to teach the Model-View-Controller design pattern, mapping the outcomes of the game, data models, and to provide students more practice building iOS apps. Students will know what an Action is, what a CGFloat value is, what the Enabled and Disabled properties for actions are, what an Outlet is, and what sliders and switch UI elements are.

The project will also give students the opportunity to build something similar in a different programming language that is the same, but very different in application. I want to do this so that my students can see how different programming languages are used in different settings for different purposes. This project also enables me to introduce the concepts of Git version control, GitHub, versioning, and pushing, pulling, and committing to GitHub. If you are going to do this project individually or with your students, I am going to assume that you have access to Mac hardware, the Books app, Python installed on the Mac, and a Python interpreter.

Learning Goal

Students will complete a Rock, Paper, Scissors game from scratch. Students will review a variety of concepts covered in the course and build the user interface, the model data, and the controller objects that make up the entire application.

Ohio CS Standard(s)

  1. ATP.CS.9-12.A.b - Define and implement an algorithm by decomposing problem requirements from a problem statement to solve a problem.
  2. ATP.VDR.9-12.F.a - Identify types of variables and data and utilize them to create a computer program that stores data in appropriate ways.
  3. ATP.CS.9-12.F.a - Define control structures and Boolean logic and use them to solve real-world scenarios.
  4. ATP.CS.9-12.F.c - Use data scoping to isolate data.
  5. ATP.PD.9-12.F.c - Correctly use consistent naming conventions, version control and comments to demonstrate why these are important for future use, maintenance and reuse of code.
  6. ATP.CS.9-12.A.a - Write programs that use library functions, methods and control structures to solve a problem.

Process 👩🏾‍🏫 👨🏻‍🏫 👨🏻‍💻 👩🏽‍💻

The general process and flow of this project is in the format of an Apple Teacher Portfolio lesson. There are three parts/phases to the lesson - Activate - Explore - Apply You can learn more about and sign up for Apple Teacher here: Apple Teacher.

Activate

We want our students to activate any prior knowledge on the topic. Since our students have previously made the Rock Paper Scissors app, they will all have some prior knowledge on how the app works. However, the goal of the project is to improve the app and update a functioning app. Here is the activity I use with my students:

  1. You and a partner will play at least ten rounds of Rock Paper Scissors. Have a third person record a video of it using an iPhone or iPad.
  2. Insert video into the first Numbers or Google Sheets tab.
  3. Record the number of wins for each player and the number of draws (ties) by putting a “1” in the correct cell.
  4. Using the Results sheet in the next tab, determine the percentage of ties that occurred.
  5. Discuss how can we make the game better and result in fewer draws (ties).
  6. Have student list the outcomes (rules) of the game: a. Scissors cut paper. b. Rock crushes scissors. c. Paper covers rock.

Explore

After we have students list the rules we are going to build a text-only version of the game in Python.

  1. Have students get the rules for the game
  2. Build Rock Paper Scissors in Python. The Python version can be found in this app's file structure. The directions and steps are within the Python file.

Apply

In this part of the project we build the app.

  1. The instructions and process of building the app starts on page 368 in the student book.
  2. Individual steps and further explanations can be found as comments in each code file in the project.

Assessment

Students will demonstrate a fully functional app that operates as intended. The demonstration will be done in the iOS Simulator app and recorded using the built-in macOS screen recorder (shift-command-5). Students submit their screen recording and a PDF of their code.

Extend

If you would like to extend this project to include more game choices, you can find how to do it here: Rock Paper Scissors Lizard Spock.

About

Rock Paper Scissors app made as part of Develop in Swift Explorations and Develop in Swift AP CS Principles.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published