Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with this game
#1
I need help to build this game Pah Tum in Python :) You can read the rules on this link. Pah_tum
Reply
#2
I'm not sure how likely it is for some forum member to go study the rules of this game, so be prepared to be on your own in that regard.
As for the code, we are glad to help if you face some issues. But you will need to post runnable code (in Python code tags) and potential error messages (in error tags).
Reply
#3
Great! Looking forward to see your post in Completed Scripts section of the forum. :-)
Reply
#4
Photo 
(Dec-14-2017, 12:44 PM)j.crater Wrote: I'm not sure how likely it is for some forum member to go study the rules of this game, so be prepared to be on your own in that regard.
As for the code, we are glad to help if you face some issues. But you will need to post runnable code (in Python code tags) and potential error messages (in error tags).

I don't know how to create blocked stones in the Board.

I have the code here:
    def blocker(self):

        add_list = [5,7,9,11,13]
        random_add = random.choice(add_list)
        for x in range(0, random_add):
            counter = 0
            while counter == 0:
                rang_a = random.randint(0, self.colums_count - 1)
                rang_b = random.randint(0, self.rows_count - 1)
                if self.board[rang_a][rang_b] == 0:
                    self.board[rang_a][rang_b] = 7
                    counter += 1
I set colums_count = 7 , rows_count = 7
Reply
#5
Quote:I don't know how to create blocked stones in the Board.
You add the python tags highlighted in green here by iether typing them out or by selecting the button python in the editor and pasting the code between the two tags

Attached Files

Thumbnail(s)
   
Recommended Tutorials:
Reply
#6
a game
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020