how to make it move position?
lynnlo
Do p1board[p1board.index(1)] = 0
and p1board[p1r] = 1
.
[deleted]
@tharlynnhtetong Yes but where do you put it?
[deleted]
@tharlynnhtetong OK Thanks!!
Do p1board[p1board.index(1)] = 0
and p1board[p1r] = 1
.
@tharlynnhtetong Yes but where do you put it?
@tharlynnhtetong OK Thanks!!
@tharlynnhtetong why does it have this?
@blackjkl
Player two has no 1 values because you've set it to 2.
Replace
p2board[p2board.index(1)] = 0
withp2board[p2board.index(2)] = 0
andp2board[p2r] = 1
withp2board[p2r] = 2
.@tharlynnhtetong THANKS!!!
@tharlynnhtetong
If you don't know what I'm doing, I'm finding the 1 in the list and setting it to 0 then I'm finding the place of the role and setting to 1 or 2 depending on the player.
@blackjkl one more thing, how do you make the most recent position change to a 0?
@tharlynnhtetong but it says this:
@blackjkl
p1board[p1board.index(1)] = 0
should already have changed it.Edit : I've looked at the code and it does not use function loops I'll reply with a better answer soon.
@tharlynnhtetong ok thanks!
@blackjkl
The lines
p1board[0] = p1board[int(str(p1r))] + p1board[0]
andp2board[0] = p2board[int(str(p2r))] + p2board[0]
are setting the first instance of the list to 1 and two respectively. Remove those to get the desired output.@tharlynnhtetong ok and THANKS!!!!!!
@tharlynnhtetong one more another thing, how do you make it repeat until someone wins?
@blackjkl replace
if p1board == p1board[20]: slowprint("p1 wins!!!") elif p2board == p2board[20]: slowprint("p2 wins!!")
with
if 1 == p1board[20]: slowprint("p1 wins!!!") elif 2 == p2board[20]: slowprint("p2 wins!!")
You seem to be new at python. You should learn the language fully with online resources. There are many free site that can help you out with python, just search "learn python" in google and you'll find a lot of resources.
@tharlynnhtetong ok I will but it still the same thing. WHY?
@blackjkl you no answer. ok I wait for someone to answer
@blackjkl and why do you
like
? it isn't that good