subject

Write a class named GessGame for playing an abstract board game called Gess. You can see the rules here. Note that when a piece's move causes it to overlap stones, any stones covered by the footprint get removed, not just those covered by one of the piece's stones. It is not legal to make a move that leaves you without a ring. It's possible for a player to have more than one ring. A player doesn't lose until they have no remaining rings. Locations on the board will be specified using columns labeled a-t and rows labeled 1-20, with row 1 being the Black side and row 20 the White side. The actual board is only columns b-s and rows 2-19. The center of the piece being moved must stay within those boundaries. An edge of the piece may go into columns a or t, or rows 1 or 20, but any pieces there are removed at the end of the move. Black goes first. There's an online implementation here you can try, but it's not 100% consistent with the rules. In the case of any discrepancy between the online game and the rules, you should comply with the rules (you can also ask us for clarification of course). One example is that the online game lets you make moves that leave you without a ring, which isn't allowed (if a player wants to end the game, they can just resign). Another example is that the online game lets you choose a piece whose center is off the board (in columns a or t, or in rows 1 or 20), which isn't allowed. Probably the easiest way of representing the board is to use a list of lists. You're not required to print the board, but you will probably find it very useful for testing purposes. Your GessGame class must include the following:An init method that initializes any data members. A method called get_game_state that takes no parameters and returns 'UNFINISHED', 'BLACK_WON' or 'WHITE_WON'.A method called resign_game that lets the current player concede the game, giving the other player the win. A method called make_move that takes two parameters - strings that represent the center square of the piece being moved and the desired new location of the center square. For example, make_move('b6', 'e9'). If the indicated move is not legal for the current player, or if the game has already been won, then it should just return False. Otherwise it should make the indicated move, remove any captured stones, update the game state if necessary, update whose turn it is, and return True. Feel free to add whatever other classes, methods, or data members you want. All data members must be private.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 22.06.2019 22:40
In this lab, you complete a python program that calculates an employee's annual bonus. input is an employee's first name, last name, salary, and numeric performance rating. if the rating is 1, 2, or 3, the bonus rate used is .25, .15, or .1 respectively. if the rating is 4 or higher, the rate is 0. the employee bonus is calculated by multiplying the bonus rate by the annual salary.
Answers: 1
question
Computers and Technology, 23.06.2019 00:10
My has been slow anyone else’s ?
Answers: 1
question
Computers and Technology, 23.06.2019 03:10
Acomputer has a two-level cache. suppose that 60% of the memory references hit on the first level cache, 35% hit on the second level, and 5% miss. the access times are 5 nsec, 15 nsec, and 60 nsec, respectively, where the times for the level 2 cache and memory start counting at the moment it is known that they are needed (e.g., a level 2 cache access does not even start until the level 1 cache miss occurs). what is the average access time?
Answers: 1
You know the right answer?
Write a class named GessGame for playing an abstract board game called Gess. You can see the rules h...
Questions
question
English, 05.05.2020 07:01
question
Mathematics, 05.05.2020 07:01
Questions on the website: 13722361