Jump to content
  • entries
    2
  • comments
    23
  • views
    452

About this blog

Placing it here!

Entries in this blog

Save System for Game

def lsave(): path = input("Welcome Back! Path to your save file?\n\n [SAVE] ") sfile = open(path, "r") save = sfile.read() sfile.close() return(parse(save)) # Save List Syntax: # name, zone, map, location, equipped items, all items, path/to/file def parse(save): lists = save.rstrip().rsplit("\n") final = [] final.append(lists[9].split(";")[0]) final.append(lists[0].split(" ")[1]) final.append([]) for i in range(1, 8): final[-1].append

Through the Living Wrath

Through the Living Wrath in Code

Deck

import random global cards global suit global discards global game cards = list(range(1, 53)) discards = [] suit = ["Clubs", "Diamonds", "Hearts", "Spades"] game = True # Place card in Discard def drawtodiscard(): global suit top = (drawCard()).split() specifiedsuit = suit.index(top[2]) discard(int(top[0])+(13*specifiedsuit)) def discard(card): global discards discards.append(card) # Checks if the deck needs shuffling. (Every slot is empty, equal to -1) def checkShuffle()

Through the Living Wrath

Through the Living Wrath in Code

×
×
  • Create New...