- Prof. Dancy's Site - Course Site -

Stranded: The Rover Game

Objectives

  1. Use object-oriented design and 2D arrays (Phase 1 & 2)
  2. Implement and use a List ADT as linked nodes (Phase 3)
  3. Implement and use a Stack ADT as linked nodes (Phase 4)
  4. Implement and use a Queue ADT as a circular array (Phase 5)
  5. Do a Big-O analysis on an ADT (the Queue) implementation (Phase 5)

The Story

The year is 2022. Personal space transport is common and you have taken your space ship out exploring. You find an ancient abandoned planet and decided to land and investigate. There was a huge storm as you landed and your ship now lies in pieces on a landing pad. There is no oxygen in air but you are able to move around in your rover. You have a repair manual, which tells you how to fix your ship, but you don't have the needed spare parts.

You see strange items scattered around on the ground. Maybe they will be useful. You also see strange glowing orbs big enough to swallow your rover. When you touch one, you get sucked in and appear in another place with items and orbs. The orb was a portal! When you re-enter the same portal, it takes you back where you came from.

Your goal is to move about the portal system and collect enough spare parts to fix your ship.

Rover ScreenShot

Other Phases

Phase 2 | Phase 3 | Phase 4 | Phase 5 |

Getting Started with the Code

First, copy the code from the following directory: ~csci204/2020-fall/student/projects/p2Dancy/
We have provided an executable prototype of the game. You should see the following set of files in your project folder:

The Point class

The GUI makes use of a Point class - a basic data structure that simply holds an x and y attribute. This class is used in the get_rover_location() and get_image() methods.

class Point:
  def __init__(self, x, y):
    self.x = x
    self.y = y

Existing Functions (Game.py):

There are a lot more methods that you'll eventually need to complete as we progress through the game development.


Phase 1: Rover Movement

The goal of part 1 is to focus on your class design and to build movement into the system.

Overview

Configuration Details

OOP Design

Although the design is largely up to you this time, think carefully about how you will structure your program. We are going to progressively expect better design from you each project, and a portion of your grade will be based on this design. Here are a few things to consider

Think carefully about the relationships between these objects. This is the hard part of design! But if you do it right, it will make all your future parts go much smoother.

Grading breakdown

Graded item Number of points
Room Setup
The rover and ship components and the parts all have working images 7 pts
The ship must have at least three different kinds of ship components and at least 6 ship components total 6 pts
Use randomness for the number of the parts 6 pts
Use randomness for the location of the parts 6 pts
The number of parts in a room should be roughly similar to image in instructions (the room shouldn't be completely covered in parts) 6 pts
There will be at least 2 portals. Again, use randomness for both the number and location of portals 6 pts
No two items (ship components, parts, portals) may be in the same location. 5 pts
The rover starts on a random location in the first room 4 pts
General Movement
The rover goes up 6 pts
The rover goes down 6 pts
The rover goes left 6 pts
The rover goes right 6 pts
Edge/Item Movement
Top Edge 4 pts
Bottom Edge 4 pts
Left Edge 4 pts
Right Edge 4 pts
The rover can stand on things (empty spaces, ship components, parts, and portals) 4 pts
Good design principles used 10 pts
Total 100 pts

Find Phase 2 here

Find Phase 3 here

Find Phase 4 here

Find Phase 5 here