Update player.py

Updated small error in allocation code not counting words correctly
This commit is contained in:
KansaiGaijin
2022-10-30 15:07:46 +13:00
committed by GitHub
parent 2d65d3f2af
commit b53d0d4f44

View File

@@ -1,6 +1,8 @@
from enum import Enum, auto from enum import Enum, auto
from random import randint from random import randint
import functions
class Player: class Player:
"""Character Creation""" """Character Creation"""
@@ -325,7 +327,7 @@ class Player:
while len(stats) != 0: while len(stats) != 0:
input_text = input(">> ").title() input_text = input(">> ").title()
words = input_text.split() words = input_text.split()
if len(words) < 2: if len(words) <= 2:
if words[0] in stats and words[1] in attributes: if words[0] in stats and words[1] in attributes:
self.stats[words[1]] += int(words[0]) self.stats[words[1]] += int(words[0])
stats.remove(words[0]) stats.remove(words[0])