@OathOfCode/

Adventure REMAKE

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import random, time
import replit as rp

#print('\n\n| = Wall\nW = Tall Grass\nT = Tree\n- = Grass\nO = Rock\[email protected] = Character\nMap layout:\n1 - 2 - 3\n4 - 5 - 6\n7 - 8 - 9\n\n')
#time.sleep(3)

# The Map
world = ['-', '-', '-',
		'-', '-', '-',
		'-', '-', '-']



outers = [0,1,2,3,5,6,7,8]

clr = rp.clear()

objects = ['T', 'O', 'W']

run = True


def world_load():
	clr
	print('|' + world[0]+ ' ' + world[1]+ ' ' + world[2] + '|')
	print('|' + world[3]+ ' ' + world[4]+ ' ' + world[5] + '|')
	print('|' + world[6]+ ' ' + world[7]+ ' ' + world[8] + '|')



def choice():
	try:
		clr
		position = int(input('Where do you wish to move? 1-9 '))
		position = position - 1
		if position in outers:
			position = 4
			world[position] = '@'


		else:
			world[position] = '@'
	except:
		print('Must input a number!')
		time.sleep(1)

while run:
	world_load()
	choice()