Sphero loves to play games of strategy. Can you write a short code for Sphero to “torpedo” your opponent's battleship?
Two or more players
Sphero Bolt or RVR (1 or 2 robots)
Chromebook or iPad with Sphero EDU installed (one for each Sphero)
painter's tape or masking tape
plain notebook paper
bulletin board paper
index cards
pens/markers
You can play Sphero Battleship with one or two Sphero robots. If playing with one, opponents take turns moving the same robot. If playing with two, assign each player a Sphero that they will move for all turns in the game.
Traditional Battleship contained 5 ships- a Carrier that occupied 5 squares on the grid, a Battleship that occupied 4 squares, a Cruiser that occupied 3 squares, a Submarine that occupied 3 squares and a Destroyer that occupied 2 squares. Traditional Battleship allowed ships to be placed horizontally or vertically, but NOT DIAGONALLY.
Note: You can alter these rules if you wish, but you must decide and agree before the game begins.
1. Each player will take turns coding Sphero to move horizontally and vertically on the grid to land on a specific grid square. Before pressing RUN you must call out your grid destination, like "A7." Then press run.
2. If Sphero lands on the correct grid square it is a successful torpedo strike. If your opponent had a ship on that grid square they will announce that it was a HIT and mark that square on their notebook paper. The striker receives a point for a successful strike on their opponent's ship.
3. If Sphero lands on the incorrect square it is a miss whether your opponent had a ship on the square or not.
3. Sphero will always begin each new turn on the grid square where he last stopped. So if Sphero last landed on A7 and you want him to move to D9, you are coding him to travel from A7 to D9. Sphero can only move horizontally or vertically, never diagonally.
Note: if playing with 2 Sphero robots and your opponent's robot is in your path, your code must have your Sphero move around the other robot.
Note: if playing with 1 Sphero robot and your opponent's last move left Sphero on A7 and you also want to move him to A7 (maybe you just got a hit on A6!), you must code him to move off of the grid square and back on in one turn.
4. The ultimate objective of the game is to sink your opponent's Battleship (successfully torpedo strike all 4 squares marked as the placement of that ship). If a player sinks the Battleship they are the winner, regardless of the total points.
5. If time does not allow for a Battleship to be sunk, the winner will be determined by the player with the most points when the game is called.
Design a Battleship grid on your bulletin board paper. Make sure you have at least 10 rows (numbers 1-10) and 10 columns (letters A-J) but you can include more if you want a longer, more challenging game. Note: you can make your grid squares any size you like, but make sure you measure them because precise measurements will be essential in getting Sphero to stop where you intend to strike.
Using the index cards, label your rows and columns with the correct numbers and letters.
Using your sheet of notebook paper, determine where you want your ships to be on the grid. Don't let your opponent see!
Once you have the placement of your ships determined it is time to begin coding! Open the Sphero EDU app and select programs from the bottom of the page. Do NOT sign into the app.
Hit the Plus sign in the bottom right hand corner, name your program and select your chosen type of program (see the activity variations below).
Take turns coding your Sphero(s) to make a torpedo strike on the grid. Don't forget to call out your intended square before running your code!
The game ends when one player has successfully struck all four squares of their opponent's Battleship and is declared the winner. OR if you run out of time, the player with the most points wins.
Variation 1: code using block coding
Variation 2: code using text coding