I'm trying to create a pythonista version of the card game cheat and I have decided to use a TextView for the first time (I'm a bit of a noob).
The problem is that I can't figure out how to edit the text. I tried Log(name of my TextView).text = 'Some text' and it didn't give me any errors but It wouldn't work. I'm probably just missing out some really stupidly obvious thing but any help would be nice 😄.
Code so far (very early stages, basically just tests and badly written button code):
import ui
import time
player = 1
amountofplayers = 4
saidlastcard = 3
lastcard = 2
cheating = False
playing = False
playing = True
def button_tapped(sender):
if(sender.name == 'Cheat'):
if(lastcard == saidlastcard):
cheating = False
else:
cheating = True
def playerswitch():
player += 1
if(player > amountofplayers):
player = 1
playing = True
ui.load_view("Cheat").present("sheet")
while playing == True:
if cheating == False:
Log.text = 'wrong'
else:
Log.text = 'right'