Giter Club home page Giter Club logo

maze's Introduction

maze

This program will implement a quest. It will start the user at the beginning of a maze, and they will have to get to the end of the maze and open a gate with a key that they get from a minotaur. The picture I used was adapted from http://www.scnfamily.org/youth/maze/files/maze2_img.jpg . The minotaur is in the dead end at the center of the maze. For the dead end counter, this state is not counted unless the minotaur is dead and you have the key.

I wrote this program for my CSC 240 class. The goal was to create a choose-your-own-adventure program, with both good and bad outcome(s). I generated most of the code with a secondary python program, because it would have taken forever to type it all, and would be error prone. The code after the comment that says, "basic finite state machine engine" was given to the class by the professor so that we could focus on the states of the adventure, instead of getting the program to run. Each student was to customize the engine to work for their code. This code works under Ubuntu 14.10, running SWI-Prolog in the command line. This is the original code that I submitted.

The optimal sequence is:

 state - option
 1 - right
 3 - right
 6 - forward
 10 - left
 7 - left
 fight the minotaur
 face the minotaur with your skill against his
 search for useful items
 take the key and leave
 7 - right
 10 - right
 6 - right
 2 - right
 5 - right
 8 - left
 11 - right
 14 - right
 13 - right
 9 - forward
 12 - left
 exit - try the gate
 gate - exit

If you lose your place, you either look at the code and figure out what section of tunnel you just walked through, start over, or hope for really good luck.

maze's People

Contributors

asinck avatar

Watchers

 avatar

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.