Skip to content

Commit

Permalink
Readme Created
Browse files Browse the repository at this point in the history
  • Loading branch information
prijindal committed Jan 31, 2015
0 parents commit b3c58ee
Show file tree
Hide file tree
Showing 18 changed files with 748 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Game.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mode con: cols=160 lines=78
python mazeg.py
Binary file added Maze.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This is a maze i created using Python
it creates a maze randomly
do ensure you have python 2.7 or later

Have Fun
47 changes: 47 additions & 0 deletions Test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
from random import shuffle,randrange
import os

def make_maze(width,height):

global vert_wall
global hori_wall
global start_time
#start_time=time.time()

fill=[[0]*width+[1] for i in range(height)] +[[1]*(width+1)]

vert_wall=[["| "]* width +['|'] for i in range(height)]+[[]]

hori_wall=[["---"]* width+['+'] for i in range(height+1)]
display(0);

def point(x,y):
fill[y][x]=1

display(2);
dir=[(x+1,y),(x-1,y),(x,y+1),(x,y-1)]
shuffle(dir)
for (i,j) in dir:

if fill[j][i]:
continue
if i==x:
hori_wall[max(y,j)][x]="+ "
if j==y:
vert_wall[y][max(x,i)]=" "
point(i,j)

point(randrange(width),randrange(height))

def display(i):

#os.system('cls')
print "This is level no. ",i
#print "Time elapsed %.0f"%(time.time()-start_time)
print "\nYour Maze looks like this\n"
for (a,b) in zip(hori_wall,vert_wall):
print ''.join(a+['\n']+b)
print "Move your Character"

make_maze(6,3);
display(1);
Binary file added Website/Capture.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions Website/Contents.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE HTML>
<!--signed Priyanshu Jindal-->
<html>
<head>
<title>Contents</title>
<meta name="author" content="Priyanshu Jindal">
</head>

<body link="black" vlink="black" alink="green" bgcolor="FFFFBB">

<p style="color:Red;font-size:24px;" align="center">Content</p>
<ol type="i">
<li><a href = "data.html#about" target="right">About The Game</a></li>
<li><a href = "data.html#interface" target="right">User Interface</a></li>
<li><a href = "data.html#download" target="right">Download the Game</a></li>
<li><a href = "data.html#code" target="right">Source Code</a></li>
<li><a href = "data.html#explain" target="right">Explanation of the Code</a></li>
<li><a href = "feedback.html" target="right">FeedBack</a></li>

</ol>


</body>
</html>
107 changes: 107 additions & 0 deletions Website/Data.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<!DOCTYPE HTML>
<!--signed Priyanshu Jindal-->
<html>
<head>
<title>Documentation about Maze Game</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="author" content="Priyanshu Jindal">
</head>

<body link="black" vlink="black" alink="green">
<center><h1>Maze<br /></h1></center>




<p class="title"><a name="about"></a>About The Game</p>
<p class ="content">
It makes a Maze generated Randomly<br />
You have to Navigate your character with the help of w,a,s,d<br />
And e to Exit out of the game<br />
It has a Total of 7 Levels<br />

</p>
<a name="interface"></a>
<p class="title">User Interface</p><br />

<a href = "Capture.jpg" target="_blank">
<img src="Capture.jpg" alt="Game Image" width="500" height="300"><br /><br />
</a>
<hr>
<a href = "finish.jpg" target="_blank">
<img src="finish.jpg" alt="Level Finished" width="500" height="300" border="4" bordercolor="white">
</a>
<p class="head">
This Game is for</p>

<ul type="square" class="content">
<li>Game developers</li>
<li>Python Enthusiasts</li>
<li>Programmers</li>
<li>Bored People who don't have AOE</li>
</ul></p>
<a name="download"></a>
<p class="head">Download the Game</p>
<a href="../maze.zip" class="content">Click here to download the zip</a>
<a name="code"></a>
<p class="head">Source Code</p>


<a href="../mazeg.py" class="content" target="_blank">Click here to open the source code</a>

<br />
<a name="explain"></a>
<p class="title">Explanation of the Code</p>
<table class="content" border="1" bgcolor="#ffff00" bordercolor="red" width="400" height="200">
<caption>Defination of every function</caption>
<tbody>
<tr>
<th>Function Name</th>
<th>What it does</th>
</tr>

<tr>
<td>display()</td>
<td>Displays the whole Maze</td>
</tr>

<tr>
<td>make_maze</td>
<td>Makes the whole maze in 2 arrays</td>
</tr>

<tr>
<td bgcolor="#00FFFF">change_position</td>
<td>Moves the player around the maze</td>
</tr>

<tr>
<td>is_win</td>
<td>Tells if player has won or not</td>
</tr>

</tbody>
<tfoot>
<tr>
<td colspan="2">Main simply accepts the data and calls the above functions
</td>
</tr>
</tfoot>
</table>
<p class="head">Explanation of Major Variable</p>
<dl>
<dt><b>hori_wall</b></dt>
<dd>two-d array of the horizontal walls "+--"</dd>

<dt><b>vert_wall</b></dt>
<dd>two-d array of the Vertical walls "|"</dd>

<dt><b>pos</b></dt>
<dd>Stores the position of the object"</dd>
</dl>

<a href="feedback.html">
<p class="head">Feedback</p>
</a>
</body>
</html>
45 changes: 45 additions & 0 deletions Website/Feedback.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE HTML>
<html>
<head>
<title>
Feedback</title>
<meta name="author" content="Priyanshu Jindal">
<script src="form.js" type="text/javascript"/></script>
</head>

<body align="center">
<h2>Enter Your Feedback</h2>
<form>
First Name
<input type="text" name="first_name" /><br><br>
Last Name
<input type="text" name="last_name" /><br><br>
E-Mail
<input type="email" name="email" /><br><br>
Till which level you were able to go<br>
<input type="radio" name="level" value="on" checked="on"> Level 1<br>
<input type="radio" name="level" value="on"> Level 2<br>
<input type="radio" name="level" value="on"> Level 3<br>
<input type="radio" name="level" value="on"> Level 4<br>
<input type="radio" name="level" value="on"> Level 5<br>
<input type="radio" name="level" value="on"> Level 6<br>
<input type="radio" name="level" value="on"> Level 7<br>
<br>
What are you?<br>
<select name="person">
<option value="Programmer">Programmer</option>
<option value="Gamer">Gamer</option>
<option value="Others">Others</option>
</select>
<br><br>
Feedback<br>
<textarea rows=6 cols=30 name="feedback">
Enter your feedback here</textarea>
<br><br>
<input type="reset" name="reset" value="Reset">
</form>
<input type="button" onclick="subm();" name="subm" value="Submit" />


<body>
<html>
Binary file added Website/finish.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions Website/form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function subm()
{
alert("Form Submitted");
}

function logo()
{
alert("Priyanshu Jindal");
}
Binary file added Website/logo.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions Website/logo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<head>
<title>
<meta name="author" content="Priyanshu Jindal">
Logo
</title>
<script src="form.js" type="text/javascript"/></script>
</head>

<body>
<p onmouseover="logo();" >
<marquee width="100%" height="100" direction="left" behaviour="slide" scrollamount="9">
<img src="logo.jpg">
</p>
</marquee>
</body>
</html>
116 changes: 116 additions & 0 deletions Website/maze.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<!DOCTYPE HTML>
<!--signed Priyanshu Jindal-->
<html>
<head>
<title>Documentation about Maze Game</title>

</head>

<body link="black" vlink="black" alink="green">
<center><h1>Maze<br /></h1></center>

<h2>Content</h2>
<ol type="i">
<li><a href = "maze.html#about">About The Game</a></li>
<li><a href = "maze.html#interface">User Interface</a></li>
<li><a href = "maze.html#download">Download the Game</a></li>
<li><a href = "maze.html#code">Source Code</a></li>
<li><a href = "maze.html#explain">Explanation of the Code</a></li>

</ol>

<p>
<h3><a name="about"></a>About The Game</h3>

It makes a Maze generated Randomly<br />
You have to Navigate your character with the help of w,a,s,d<br />
And e to Exit out of the game<br />
It has a Total of 7 Levels<br />

</p>
<a name="interface"></a>
<h4>User Interface</h4><br />
<a href = "Capture.jpg" target="_blank">
<img src="Capture.jpg" alt="Game Image" width="500" height="300"><br /><br />
</a>
<hr>
<a href = "finish.jpg" target="_blank">
<img src="finish.jpg" alt="Level Finished" width="500" height="300" border="4" bordercolor="white">
</a>
<h4>This Game is for</h4>
<ul type="square">
<li>Game developers</li>
<li>Python Enthusiasts</li>
<li>Programmers</li>
<li>Bored People who don't have AOE</li>
</ul>
<a name="download"></a>
<h3>Download the Game</h3>
<a href="maze.zip">Click here to download the zip</a>
<a name="code"></a>
<h4>Source Code</h4>
<code>
<a href="mazeg.py" target="_blank">Click here to open the source code</a>
</code>
<br />
<a name="explain"></a>
<h2>Explanation of the Code</h2>
<table border="1" bgcolor="#ffff00" bordercolor="red" width="400" height="200">
<caption>Defination of every function</caption>
<tbody>
<tr>
<th>Function Name</th>
<th>What it does</th>
</tr>

<tr>
<td>display()</td>
<td>Displays the whole Maze</td>
</tr>

<tr>
<td>make_maze</td>
<td>Makes the whole maze in 2 arrays</td>
</tr>

<tr>
<td bgcolor="#00FFFF">change_position</td>
<td>Moves the player around the maze</td>
</tr>

<tr>
<td>is_win</td>
<td>Tells if player has won or not</td>
</tr>

</tbody>
<tfoot>
<tr>
<td colspan="2">Main simply accepts the data and calls the above functions
</td>
</tr>
</tfoot>
</table>
<h4>Explanation of Major Variable</h4>
<dl>
<dt><b>hori_wall</b></dt>
<dd>two-d array of the horizontal walls "+--"</dd>

<dt><b>vert_wall</b></dt>
<dd>two-d array of the Vertical walls "|"</dd>

<dt><b>pos</b></dt>
<dd>Stores the position of the object"</dd>
</dl>
<a href ="Game.bat">
<img src="logo.jpg">
</a>
<hr><div align="right">
Made by:-<br>
<a href="mailto:[email protected]?subject=Feedback&body=I think of this maze as ">
Priyanshu Jindal
</a>
</div>

</body>
</html>
Loading

0 comments on commit b3c58ee

Please sign in to comment.