Git Product home page Git Product logo

hidden_item's Introduction

Hidden Item Game

Introduction

This is a simple command-line program for a hidden item game. In this game, you are placed in a grid with various obstacles (marked as #), clear paths (marked as .), and a starting position (marked as X). Your objective is to find the hidden item within the grid.

You must navigate in a specific order: first moving up (North), then right (East), and finally down (South). The program will provide you with a list of probable coordinates where the item might be located, and it can also display the grid with the probable item locations marked with a "$" symbol.

Grid Layout

The grid is represented using the following symbols: "#": Obstacles ".": Clear paths "X": Starting position "$": Probable item locations (only displayed in the grid when showing the results)

Running the Program

To run the program, simply execute the provided PHP script . The program will display the list of probable item locations in the grid and mark it as '$'.

php hiddenitem.php

Additional Features

Bonus points can be earned for displaying the grid with the probable item locations marked with a "$" symbol.

Program Output

Original Grid:
########
#......#
#.###..#
#...#.##
#X#....#
########
Probable Locations (x,y):
1. (3,1)
2. (3,2)
3. (3,3)
4. (4,3)
5. (2,1)
6. (1,1)
7. (1,2)
8. (1,3)
9. (1,4)
10. (1,5)
11. (2,5)
12. (3,5)
13. (4,5)
14. (1,6)
15. (2,6)
Grid with the Probable Locations Marked With '$' Symbol:
########
#$$$$$$#
#$###$$#
#$$$#$##
#X#$.$.#
########

hidden_item's People

Contributors

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