Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with this game
#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


Messages In This Thread
Help with this game - by GinQt - Dec-14-2017, 12:26 PM
RE: Help with this game - by j.crater - Dec-14-2017, 12:44 PM
RE: Help with this game - by GinQt - Dec-14-2017, 01:22 PM
RE: Help with this game - by GinQt - Dec-17-2017, 07:01 PM
RE: Help with this game - by buran - Dec-14-2017, 12:44 PM
RE: Help with this game - by metulburr - Dec-14-2017, 02:07 PM

Forum Jump:

User Panel Messages

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