Here are the details: The board is a 9 x 9 board. Use a list...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Here are the details: • The board is a 9 x 9 board. Use a list of lists to store your current board. • Display the current state of the board before every move. Each empty point should just be a period. Each point with a stone should have that stone's identifier. For identifiers, you may use lower-case for the white stones and upper-case for the black stones. • Use 0/o or distinct round symbols (*, @, •, etc). For a fun alternative, see the note at the bottom. When a stone is placed, it must be placed on an empty point. • Continue to let users place stones until they enter "stop". Important: You do NOT need to enforce any rules of Go or verify moves, with two exceptions: If a user tries to place a stone where one already exists, print a message to the screen and try again. Alternate turns with black placing the first stone. • • Other than that, you don't need to worry about placing stones on forbidden points, removing stones, determining a winner, etc. This is an open-ended assignment. Feel free to get creative with your output! You need to specify the system you want to use to identify the locations on the board. In your pdf document, include instructions for user input. This problem will be graded manually so your instructions must be clear. In Go a simple coordinate system similar to chess is used to identify points on the board. You do not have to use this system, but you can if you wish. Your pdf must include an algorithm and instructions for running your program. Part 2: Now that your team has planned everything, write a program named go_moves.py that sets up a Go board and lets users place stones. Remember to write test cases and use the "pyramid" approach to programming! As an example, here is what the board would look like in the middle of a game: ..O.. .000. .0000. ..oooo... ...00.... Remember to discuss this as a team and think through exactly what you will do before developing it! Note: You can display empty and filled circles using Unicode characters like the example below. print (chr (9675)) print (chr (9679)) #displays empty circle: 0 #displays filled circle: You can also change the color of your output using the colorama package like the example below. from colorama import Fore, Style print (Fore. RED + Style. BRIGHT + 'my text' +Fore.RESET+ Style. NORMAL) # displays 'my text' in bright red, then resets future text back # to default colors If you do not have colorama installed, you can use the following strings to do the same thing. begin = '\x1b [1m' end = '\x1b [39m\x1b [22m' colors = {'red': '\x1b [31m', 'blue': '\x1b [34m', 'green' : '\x1b [32m' } print (begin+colors ['red'] + 'red text'+end+back to normal') print (begin + colors ['blue'] + 'blue text' + end + back to normal'). print (begin + colors ['green'] + 'green text' + end + back to normal') 1 Here are the details: • The board is a 9 x 9 board. Use a list of lists to store your current board. • Display the current state of the board before every move. Each empty point should just be a period. Each point with a stone should have that stone's identifier. For identifiers, you may use lower-case for the white stones and upper-case for the black stones. • Use 0/o or distinct round symbols (*, @, •, etc). For a fun alternative, see the note at the bottom. When a stone is placed, it must be placed on an empty point. • Continue to let users place stones until they enter "stop". Important: You do NOT need to enforce any rules of Go or verify moves, with two exceptions: If a user tries to place a stone where one already exists, print a message to the screen and try again. Alternate turns with black placing the first stone. • • Other than that, you don't need to worry about placing stones on forbidden points, removing stones, determining a winner, etc. This is an open-ended assignment. Feel free to get creative with your output! You need to specify the system you want to use to identify the locations on the board. In your pdf document, include instructions for user input. This problem will be graded manually so your instructions must be clear. In Go a simple coordinate system similar to chess is used to identify points on the board. You do not have to use this system, but you can if you wish. Your pdf must include an algorithm and instructions for running your program. Part 2: Now that your team has planned everything, write a program named go_moves.py that sets up a Go board and lets users place stones. Remember to write test cases and use the "pyramid" approach to programming! As an example, here is what the board would look like in the middle of a game: ..O.. .000. .0000. ..oooo... ...00.... Remember to discuss this as a team and think through exactly what you will do before developing it! Note: You can display empty and filled circles using Unicode characters like the example below. print (chr (9675)) print (chr (9679)) #displays empty circle: 0 #displays filled circle: You can also change the color of your output using the colorama package like the example below. from colorama import Fore, Style print (Fore. RED + Style. BRIGHT + 'my text' +Fore.RESET+ Style. NORMAL) # displays 'my text' in bright red, then resets future text back # to default colors If you do not have colorama installed, you can use the following strings to do the same thing. begin = '\x1b [1m' end = '\x1b [39m\x1b [22m' colors = {'red': '\x1b [31m', 'blue': '\x1b [34m', 'green' : '\x1b [32m' } print (begin+colors ['red'] + 'red text'+end+back to normal') print (begin + colors ['blue'] + 'blue text' + end + back to normal'). print (begin + colors ['green'] + 'green text' + end + back to normal') 1
Expert Answer:
Answer rating: 100% (QA)
Based on the details provided you are tasked with writing a program to simulate a Go board that fulf... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Will people continue to use Zoom for a larger portion of their social interactions in the future, or do you think they will actually value face-to-face interactions even more, given most people were...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
This short exercise demonstrates the similarity and the difference between two ways to acquire plant assets. i (Click the icon to view the cases.) Compare the balances in all the accounts after...
-
At the beginning of 2015, Lindy Weink, the controller of Lafrenire Inc., reviewed the expected useful life and residual value of two of the company's machines and proposed changes as follows:...
-
Presented below are three independent situations. 1. During 2022, Maverick ASA became involved in a tax dispute with the government. Mavericks attorneys have indicated that they believe it is...
-
What is a minute order?
-
On July 23 of the current year, Dakota Mining Co. pays $4,836,000 for land estimated to contain 7,800,000 tons of recoverable ore. It installs machinery costing $390,000 that has a 10-year life and...
-
What is required by organizations to really profit from the strategic potential of EA ? Why would these requirements make it difficult to enact EA ?
-
Use the graph to find the following limits and function value for each value of a. i) lim f(x) ii) lim f(x) iii) lim f(x) iv) f(a), if it exists. xa xa* x-a a. For a = 2 b. For a = 4 O o 57
-
How would you import a relational model design and generate a logical model from a relational model?
-
Could you kindly provide a pseudo-code implementation for the Three-Frame Differencing (TFD) technique, a method often employed in computer vision for motion detection and tracking?
-
How do organizations align performance management systems with strategic objectives and organizational goals, ensuring coherence and consistency in evaluating individual and team contributions to...
-
Consider that the ball has an initial speed of 40 m/s and is struck at an angle of 50 with respect to the horizontal. What is the ball's horizontal velocity? Answer to the nearest tenths place.
-
The forecast including trend (FIT) of 110 is composed of Ft = 100 units, a Tt = 10 units, an alpha (a) of 0.20, and a delta(6 of 0.50. If actual demand turned out to be 120, calculate the forecast...
-
Mention the types of appointment into civil service?
-
(a) Explain why the concentration of dissolved oxygen in freshwater is an important indicator of the quality of the water. (b) How is the solubility of oxygen in water affected by increasing...
-
Sally and Charles Heck received the following dividends and interest during 2012: Assuming the Hecks file a joint tax return, complete Schedule B of Form 1040 (on page 2-33) for them for the 2012 tax...
-
Laura is a single taxpayer living in New Jersey with adjusted gross income for the 2012 tax year of $35,550. Laura's employer withheld $3,300 in state income tax from her salary. In April of 2012,...
-
Matthew borrows $250,000 to invest in bonds. During 2012, his interest on the loan is $30,000. Matthew's interest income from the bonds is $10,000. This is Matthew's only investment income. a....
-
Describe one occasion where you have been influenced to buy a product or engage in an activity as a direct result of an item of corporate communication, eg social media update; and explain what that...
-
What are the elements of a master budget?
-
Discuss the potential conflict between using a budget as a motivational device and as a means of control.
Study smarter with the SolutionInn App