Skip to content

Instantly share code, notes, and snippets.

@arkag
Created June 14, 2015 16:16
Show Gist options
  • Select an option

  • Save arkag/eaa12029de0592b4cd7a to your computer and use it in GitHub Desktop.

Select an option

Save arkag/eaa12029de0592b4cd7a to your computer and use it in GitHub Desktop.
import os
import os.path
def new():
print("This is your new game.")
os.makedirs('sav', exist_ok=True)
i = 0
name = 'save*.cwr'
for i in ['*' for name in os.listdir('sav') if os.path.isfile(name)]:
i+=1
print('number of previous saves: ' + str(i))
open('sav/save' + str(i) + '.cwr', 'a')
choice()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment