Giter Site home page Giter Site logo

find-that-shoe's Introduction

Find That Shoe!

Write a C program implementing a game that simulates the task of finding that shoe.

Find that shoe! is a text-based game, set in a two-storey house with a garage and a yard. Refer to Figure 1 for the house layout. This can help you imagine your location as you play the game. On the left is the ground floor layout, where you find the garage, covered entry, foyer, powder room, living room, dining room, kitchen and covered terrace. Coming from inside the house, the garden is accessible through the covered terrace and the covered entry. The stairs lead to the second floor. The second floor layout is the figure on the right. On the second floor, you will find the master bedroom. The master bedroom has a walk in closet (W.I.C.) and a master bathroom. Your bedroom (bedroom #2) is also on the second floor. Your bedroom also has a walk in closet. The second floor also houses the guest suite or den (when there is no guest), a common bathroom (bath #2), the laundry room, and a linen closet.

At the start of the game, you, as well as the shoe, can be anywhere in the house. As you go around the house looking for that shoe, your dog occasionally shows up (more often than not, as dogs always want to be with their humans). If you pet your dog, you get a heart ♡. By the way, the dog’s name is Bailey, if it’s a male dog, or Kahlua, if a female dog. You may also find dog toys lying around the house. There are only three types of toys, namely, a chew toy, a rope, and a ball. If you pick up the toy, you get a heart when you put the toy in one of the toy bins located either in your bedroom, the garage, or the covered terrace. You do not need to put the toy in the bin immediately. You can carry it, while looking for that shoe, until you reach one of the rooms with a toy bin. But you can only carry a maximum of two toys, one on each hand. Since your hands are full, you need to go the room where a toy bin is located and put the toys in the bin. If you do not pick up the toy, you run the risk of stepping on that toy, which adds 3 seconds to your total time.

Upon arriving at a location you are presented with the following options: look for that shoe, go to other locations (only locations adjacent to the current location will be shown), pick up toy (if there’s a toy), pet your dog (if the dog shows up), put toy in bin (if you are carrying a toy and there is a toy bin in the room), or quit finding that shoe. Whatever you choose to do, you run the risk of stepping on the toy if you did not pick it up.

If you choose to look for that shoe, you are allotted 2 seconds to find it. If you did not find it, you will be asked if you want to look again. You are given up to five chances of looking for that shoe at a particular location. At the fifth try, you are sure to find that shoe if it is there.

The game ends when you find that shoe and you are not carrying a toy. The time (in seconds) it took you to find that shoe will be shown together with the congratulatory message, e.g. “Congratulations! It took you 127 seconds to find that shoe!”. If you collected hearts while looking for that shoe, the number of hearts multiplied by 2 will be deducted from your total time. You may post this message, instead, “Congratulations! It took you 127 seconds to find that shoe! Since you collected 5 hearts, we deducted 10 seconds from your total time. Your final time is 117!” The game also ends when the user opts to quit anytime. You need to confirm if the user wants to quit the game as he/she might have quit accidentally. If the user confirms to quit, post a message regretting that he/she quit and revealing where the shoe is located, e.g “Sorry you were not able to find that shoe. Bailey hid it in the walk-in closet of the master bedroom. Come and play again sometime!”

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.