-
Notifications
You must be signed in to change notification settings - Fork 0
/
todo.txt
49 lines (45 loc) · 869 Bytes
/
todo.txt
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
todo: snapshots/states (undo/redo)
todo: paths
todo: freezing seperate pointers
todo: dont close with unsaved info
todo: stackstack**
todo: cmdline args
todo(?): mirroring selected
todo: number converter
values="0123456789abcdef"
def numberToBefunge(num): #Basically does a base-15 thing
if num==0:
return '0'
if num<0:
result="0"
negative=True
else:
result=""
negative=False
num=abs(num)
place=0
numBefore=False
while num!=0:
if place==0:
value=num%15
num-=value
if value!=0:
result+=values[value]
numBefore=True
else:
value=(num%(15**(place+1)))
num-=value
value=value//(15**place)
if value!=0:
result+='f'
if (place>1):
result+="f*"*(place-1)
if value!=1:
result+=values[value]+'*'
if numBefore:
result+="+"
numBefore=True
place+=1
if negative:
result+='-'
return result