Git Product home page Git Product logo

maze's Introduction

Maze

The maze is a game presented in the terminal with characters. In the game a hero will explore the maze, fighting with monsters and interacting with goblins. First, a maze with size 17 * 17 s is randomly generated and positions of the hero, 5 s monsters and 5 goblins are randomly generated. The hero is represented by the symbol “H”, the monsters by “M” and the goblins by “G”. The maze is closed with no entrance and exit. The “#” symbol represents the walls, whereas the “-“ is for the free spaces. The initial positions of the hero, the monsters and the goblins are displayed with the maze in the beginning of the game. There is only one hero in the game. You can move him by using the keyboard arrows: up, down, left and right. The hero cannot go through the walls and if he tries to do it he stays at the same position. There are three types of monsters – thief, fighter and gamer monster, and three types of goblins – wealth, health and gamer goblin, all with various abilities, which are random generated in a particular range of numbers. For example a thief number can have an ability (45, 90%) which means that he will steal 45 gold coins from the hero with a success rate of 90%. Before and after each interaction between the hero and the monsters and the goblins there is a message displayed in the terminal. The monsters are the hero enemies and the only can steal from him. After a fight with a monster the hero is at the same position and stays behind the monster, so he cannot be seen in that moment. In spite of this, his coordinates are displayed on the screen – he can be easily found. The goblins are hero’s friends and they can give him some coins or health points. After an interaction with a goblin, it will disappear (the goblin). The hero starts with 100 health points and 1000 gold coins. He dies if the health points drop to zero. He wins if he meets all the monsters at least once and still survives – having health points more than zero. The main purpose of the game is to find the right strategy in order to win as many gold coins possible and lose as little health score as possible!

Run Instructions

Navigate to the game directory and run "python playgame.py" in the console

maze's People

Contributors

danaildimovv 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.