SlideShare uma empresa Scribd logo
1 de 1
Baixar para ler offline
(Coding in Java) (PLEASE PROVIDE A CODE THAT RUNS, PRINTS THE BOARD, HAS A
CONSOLE UI CLASS AND MEETS ALL OR AT LEAST MOST OF THE REQUIREMENTS.
THANK YOU.) (AND IF YOU CAN CREATE A UML CLASS DIAGRAM) Design and code an
Omok application that takes all user inputs from the standard input (System.in) and displays all
outputs to the standard output (System.out). Omok (a.k.a. Gomoku and Gobang), literally meaning
five pieces, is a two-player strategy game typically played with go pieces --- black and white
stones --- on a go board with 15x15 intersections (or places) [Wikipedia]. It is also possible to play
the game with paper and pencils because stones, once placed, can't be moved or removed from
the board. The two players alternate and place a stone of their color on an empty intersection. The
game objective is to put one's stones in a row of five consecutive places vertically, horizontally, or
diagonally. The winner is the first player to create an unbroken row of five stones. Your application
shall meet the following requirements. R1. The application shall take all user inputs from the
standard input (System.in) and display all output to the standard output (System.out). R2. The
application shall provide two different game modes: human game and strategy game. In the first
game mode, two human players play against each other, and in the second, a human player plays
against the computer. Your application shall provide a realistic or reasonable playing strategy for
the computer. Minimally, it should detect a winning/losing row, e.g., four consecutive stones with
an open end. R3. The game board shall consist of n*n intersections (or places) on which stones of
the players are placed, where n >= 15. R4. The application shall provide a way for the user to
select the game mode (see R2 above). R5. The application shall provide a way for the user to
place his or her stone in an empty intersection (or place) of the board. R6. The application shall
show the progress of a game by displaying the current configuration of the board -- all the stones
placed -- along with other status information, e.g., a player's turn. Consider using an ASCII
drawing to show the board configuration. R7. When the game ends, the application shall display
the outcome of the game --- a win or draw --- and highlight the winning row. R8. The application
shall provide a way to quit the game, e.g., by entering a special input value. R9. You shall
separate your user interface (UI) code from the model code that performs the game logic. The
model code should not depend on the UI code. We suggest you create a separate class for the UI,
say ConsoleUI, and make the model code independent of the UI class. That is, the UI code may
depend on the model code, but not the other way around. Note you will reuse your model code in
later assignments but not the UI code. 1. Code your design by naming your main (or entry point)
class as Main. 2. (Bonus: 10+ points) Implement a "cheat" mode and provide a way to enable and
disable it --- e.g., entering a special value when prompted for the next move. In the cheat mode,
the application suggests the next move for the user. It should minimally detect a winning or losing
sequence, e.g., a row of four consecutive stones with an open end. TESTING Your code should
compile and run correctly with Java 10 or later versions.

Mais conteúdo relacionado

Semelhante a Coding in Java PLEASE PROVIDE A CODE THAT RUNS PRINTS T.pdf

Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA GameSohil Gupta
 
Tic tac toe c++ programing
Tic tac toe c++ programingTic tac toe c++ programing
Tic tac toe c++ programingKrishna Agarwal
 
Ludo game using c++ with documentation
Ludo game using c++ with documentation Ludo game using c++ with documentation
Ludo game using c++ with documentation Mauryasuraj98
 
Android application - Tic Tac Toe
Android application - Tic Tac ToeAndroid application - Tic Tac Toe
Android application - Tic Tac ToeSarthak Srivastava
 
Chapt 6 game testing and publishing
Chapt 6   game testing and publishingChapt 6   game testing and publishing
Chapt 6 game testing and publishingMuhd Basheer
 
C PROGRAM CODE FOR SNAKE AND LADDER GAME
C PROGRAM CODE FOR SNAKE AND LADDER GAMEC PROGRAM CODE FOR SNAKE AND LADDER GAME
C PROGRAM CODE FOR SNAKE AND LADDER GAMEAbarajitha3
 
Multiplayer Networking Game
Multiplayer Networking GameMultiplayer Networking Game
Multiplayer Networking GameTanmay Krishna
 
Connect4.c2. Include the string.h header file3. Declare the foll.pdf
Connect4.c2. Include the string.h header file3. Declare the foll.pdfConnect4.c2. Include the string.h header file3. Declare the foll.pdf
Connect4.c2. Include the string.h header file3. Declare the foll.pdfshakilaghani
 
International journal of engineering issues vol 2015 - no 2 - paper1
International journal of engineering issues   vol 2015 - no 2 - paper1International journal of engineering issues   vol 2015 - no 2 - paper1
International journal of engineering issues vol 2015 - no 2 - paper1sophiabelthome
 
ma project
ma projectma project
ma projectAisu
 
This is an individual project, to be completed on your own. It i.docx
This is an individual project, to be completed on your own. It i.docxThis is an individual project, to be completed on your own. It i.docx
This is an individual project, to be completed on your own. It i.docxabhi353063
 
You will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdfYou will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdfFashionColZone
 
presentationprintTemp.ppt auto cad presentation
presentationprintTemp.ppt auto cad presentationpresentationprintTemp.ppt auto cad presentation
presentationprintTemp.ppt auto cad presentationvikramchandrachoudha
 
Game Design Document - Step by Step Guide
Game Design Document - Step by Step GuideGame Design Document - Step by Step Guide
Game Design Document - Step by Step GuideDevBatch Inc.
 

Semelhante a Coding in Java PLEASE PROVIDE A CODE THAT RUNS PRINTS T.pdf (18)

TIC-TAC-TOE IN C
TIC-TAC-TOE IN CTIC-TAC-TOE IN C
TIC-TAC-TOE IN C
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
 
Tic tac toe c++ programing
Tic tac toe c++ programingTic tac toe c++ programing
Tic tac toe c++ programing
 
Ludo game using c++ with documentation
Ludo game using c++ with documentation Ludo game using c++ with documentation
Ludo game using c++ with documentation
 
Android application - Tic Tac Toe
Android application - Tic Tac ToeAndroid application - Tic Tac Toe
Android application - Tic Tac Toe
 
Chapt 6 game testing and publishing
Chapt 6   game testing and publishingChapt 6   game testing and publishing
Chapt 6 game testing and publishing
 
C PROGRAM CODE FOR SNAKE AND LADDER GAME
C PROGRAM CODE FOR SNAKE AND LADDER GAMEC PROGRAM CODE FOR SNAKE AND LADDER GAME
C PROGRAM CODE FOR SNAKE AND LADDER GAME
 
Multiplayer Networking Game
Multiplayer Networking GameMultiplayer Networking Game
Multiplayer Networking Game
 
Autocad 2007
Autocad 2007Autocad 2007
Autocad 2007
 
Connect4.c2. Include the string.h header file3. Declare the foll.pdf
Connect4.c2. Include the string.h header file3. Declare the foll.pdfConnect4.c2. Include the string.h header file3. Declare the foll.pdf
Connect4.c2. Include the string.h header file3. Declare the foll.pdf
 
International journal of engineering issues vol 2015 - no 2 - paper1
International journal of engineering issues   vol 2015 - no 2 - paper1International journal of engineering issues   vol 2015 - no 2 - paper1
International journal of engineering issues vol 2015 - no 2 - paper1
 
ma project
ma projectma project
ma project
 
This is an individual project, to be completed on your own. It i.docx
This is an individual project, to be completed on your own. It i.docxThis is an individual project, to be completed on your own. It i.docx
This is an individual project, to be completed on your own. It i.docx
 
You will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdfYou will write a multi-interface version of the well-known concentra.pdf
You will write a multi-interface version of the well-known concentra.pdf
 
presentationprintTemp.ppt auto cad presentation
presentationprintTemp.ppt auto cad presentationpresentationprintTemp.ppt auto cad presentation
presentationprintTemp.ppt auto cad presentation
 
Game Design Document - Step by Step Guide
Game Design Document - Step by Step GuideGame Design Document - Step by Step Guide
Game Design Document - Step by Step Guide
 
efy-articles
efy-articlesefy-articles
efy-articles
 
Autocad
AutocadAutocad
Autocad
 

Mais de accostinternational

6 In humans the Rh blood group has only two alleles R and.pdf
6 In humans the Rh blood group has only two alleles R and.pdf6 In humans the Rh blood group has only two alleles R and.pdf
6 In humans the Rh blood group has only two alleles R and.pdfaccostinternational
 
Cual de los siguientes es verdadero El uso tico de las c.pdf
Cual de los siguientes es verdadero  El uso tico de las c.pdfCual de los siguientes es verdadero  El uso tico de las c.pdf
Cual de los siguientes es verdadero El uso tico de las c.pdfaccostinternational
 
Consider the transaction database represented by the matrix .pdf
Consider the transaction database represented by the matrix .pdfConsider the transaction database represented by the matrix .pdf
Consider the transaction database represented by the matrix .pdfaccostinternational
 
Complete the following table SourceAnnual Dose .pdf
Complete the following table    SourceAnnual Dose .pdfComplete the following table    SourceAnnual Dose .pdf
Complete the following table SourceAnnual Dose .pdfaccostinternational
 
Professional Development Initiative Scenario As current o.pdf
Professional Development Initiative Scenario   As current o.pdfProfessional Development Initiative Scenario   As current o.pdf
Professional Development Initiative Scenario As current o.pdfaccostinternational
 
Write python code to do the following Define a class call.pdf
Write python code to do the following  Define a class call.pdfWrite python code to do the following  Define a class call.pdf
Write python code to do the following Define a class call.pdfaccostinternational
 
When attempting to determine the identity of a person who re.pdf
When attempting to determine the identity of a person who re.pdfWhen attempting to determine the identity of a person who re.pdf
When attempting to determine the identity of a person who re.pdfaccostinternational
 
What are your 2 favorite ways to communicate with someone pe.pdf
What are your 2 favorite ways to communicate with someone pe.pdfWhat are your 2 favorite ways to communicate with someone pe.pdf
What are your 2 favorite ways to communicate with someone pe.pdfaccostinternational
 
C Jones is a 63yearold female with a fiveyear history of.pdf
C Jones is a 63yearold female with a fiveyear history of.pdfC Jones is a 63yearold female with a fiveyear history of.pdf
C Jones is a 63yearold female with a fiveyear history of.pdfaccostinternational
 
We know the following expected returns for stocks A and B g.pdf
We know the following expected returns for stocks A and B g.pdfWe know the following expected returns for stocks A and B g.pdf
We know the following expected returns for stocks A and B g.pdfaccostinternational
 
The following assumptions and exhibits will be used in prepa.pdf
The following assumptions and exhibits will be used in prepa.pdfThe following assumptions and exhibits will be used in prepa.pdf
The following assumptions and exhibits will be used in prepa.pdfaccostinternational
 
Task 4 The scope of variables What is the output of the fol.pdf
Task 4 The scope of variables What is the output of the fol.pdfTask 4 The scope of variables What is the output of the fol.pdf
Task 4 The scope of variables What is the output of the fol.pdfaccostinternational
 
A Describir cmo se transporta la informacin gentica en l.pdf
A Describir cmo se transporta la informacin gentica en l.pdfA Describir cmo se transporta la informacin gentica en l.pdf
A Describir cmo se transporta la informacin gentica en l.pdfaccostinternational
 
EXHIBIT 515 Payroll System FlowchartFollowing is a selec.pdf
EXHIBIT 515 Payroll System FlowchartFollowing is a selec.pdfEXHIBIT 515 Payroll System FlowchartFollowing is a selec.pdf
EXHIBIT 515 Payroll System FlowchartFollowing is a selec.pdfaccostinternational
 
Regarding the ENS The descending interneurons release 1 t.pdf
Regarding the ENS The descending interneurons release 1 t.pdfRegarding the ENS The descending interneurons release 1 t.pdf
Regarding the ENS The descending interneurons release 1 t.pdfaccostinternational
 
React mui question I am passing a data into a Item Every.pdf
React mui question I am passing a data into a Item Every.pdfReact mui question I am passing a data into a Item Every.pdf
React mui question I am passing a data into a Item Every.pdfaccostinternational
 
public class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdfpublic class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdfaccostinternational
 
please and thank you Adapted from Kristen St John James.pdf
please and thank you  Adapted from Kristen St John James.pdfplease and thank you  Adapted from Kristen St John James.pdf
please and thank you Adapted from Kristen St John James.pdfaccostinternational
 
Joe and Jessie are married and have one dependent child Liz.pdf
Joe and Jessie are married and have one dependent child Liz.pdfJoe and Jessie are married and have one dependent child Liz.pdf
Joe and Jessie are married and have one dependent child Liz.pdfaccostinternational
 
K Direktr olarak David bir eitlilik ynetimi program pla.pdf
K Direktr olarak David bir eitlilik ynetimi program pla.pdfK Direktr olarak David bir eitlilik ynetimi program pla.pdf
K Direktr olarak David bir eitlilik ynetimi program pla.pdfaccostinternational
 

Mais de accostinternational (20)

6 In humans the Rh blood group has only two alleles R and.pdf
6 In humans the Rh blood group has only two alleles R and.pdf6 In humans the Rh blood group has only two alleles R and.pdf
6 In humans the Rh blood group has only two alleles R and.pdf
 
Cual de los siguientes es verdadero El uso tico de las c.pdf
Cual de los siguientes es verdadero  El uso tico de las c.pdfCual de los siguientes es verdadero  El uso tico de las c.pdf
Cual de los siguientes es verdadero El uso tico de las c.pdf
 
Consider the transaction database represented by the matrix .pdf
Consider the transaction database represented by the matrix .pdfConsider the transaction database represented by the matrix .pdf
Consider the transaction database represented by the matrix .pdf
 
Complete the following table SourceAnnual Dose .pdf
Complete the following table    SourceAnnual Dose .pdfComplete the following table    SourceAnnual Dose .pdf
Complete the following table SourceAnnual Dose .pdf
 
Professional Development Initiative Scenario As current o.pdf
Professional Development Initiative Scenario   As current o.pdfProfessional Development Initiative Scenario   As current o.pdf
Professional Development Initiative Scenario As current o.pdf
 
Write python code to do the following Define a class call.pdf
Write python code to do the following  Define a class call.pdfWrite python code to do the following  Define a class call.pdf
Write python code to do the following Define a class call.pdf
 
When attempting to determine the identity of a person who re.pdf
When attempting to determine the identity of a person who re.pdfWhen attempting to determine the identity of a person who re.pdf
When attempting to determine the identity of a person who re.pdf
 
What are your 2 favorite ways to communicate with someone pe.pdf
What are your 2 favorite ways to communicate with someone pe.pdfWhat are your 2 favorite ways to communicate with someone pe.pdf
What are your 2 favorite ways to communicate with someone pe.pdf
 
C Jones is a 63yearold female with a fiveyear history of.pdf
C Jones is a 63yearold female with a fiveyear history of.pdfC Jones is a 63yearold female with a fiveyear history of.pdf
C Jones is a 63yearold female with a fiveyear history of.pdf
 
We know the following expected returns for stocks A and B g.pdf
We know the following expected returns for stocks A and B g.pdfWe know the following expected returns for stocks A and B g.pdf
We know the following expected returns for stocks A and B g.pdf
 
The following assumptions and exhibits will be used in prepa.pdf
The following assumptions and exhibits will be used in prepa.pdfThe following assumptions and exhibits will be used in prepa.pdf
The following assumptions and exhibits will be used in prepa.pdf
 
Task 4 The scope of variables What is the output of the fol.pdf
Task 4 The scope of variables What is the output of the fol.pdfTask 4 The scope of variables What is the output of the fol.pdf
Task 4 The scope of variables What is the output of the fol.pdf
 
A Describir cmo se transporta la informacin gentica en l.pdf
A Describir cmo se transporta la informacin gentica en l.pdfA Describir cmo se transporta la informacin gentica en l.pdf
A Describir cmo se transporta la informacin gentica en l.pdf
 
EXHIBIT 515 Payroll System FlowchartFollowing is a selec.pdf
EXHIBIT 515 Payroll System FlowchartFollowing is a selec.pdfEXHIBIT 515 Payroll System FlowchartFollowing is a selec.pdf
EXHIBIT 515 Payroll System FlowchartFollowing is a selec.pdf
 
Regarding the ENS The descending interneurons release 1 t.pdf
Regarding the ENS The descending interneurons release 1 t.pdfRegarding the ENS The descending interneurons release 1 t.pdf
Regarding the ENS The descending interneurons release 1 t.pdf
 
React mui question I am passing a data into a Item Every.pdf
React mui question I am passing a data into a Item Every.pdfReact mui question I am passing a data into a Item Every.pdf
React mui question I am passing a data into a Item Every.pdf
 
public class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdfpublic class MyLinkedListltE extends ComparableltEgtg.pdf
public class MyLinkedListltE extends ComparableltEgtg.pdf
 
please and thank you Adapted from Kristen St John James.pdf
please and thank you  Adapted from Kristen St John James.pdfplease and thank you  Adapted from Kristen St John James.pdf
please and thank you Adapted from Kristen St John James.pdf
 
Joe and Jessie are married and have one dependent child Liz.pdf
Joe and Jessie are married and have one dependent child Liz.pdfJoe and Jessie are married and have one dependent child Liz.pdf
Joe and Jessie are married and have one dependent child Liz.pdf
 
K Direktr olarak David bir eitlilik ynetimi program pla.pdf
K Direktr olarak David bir eitlilik ynetimi program pla.pdfK Direktr olarak David bir eitlilik ynetimi program pla.pdf
K Direktr olarak David bir eitlilik ynetimi program pla.pdf
 

Último

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 

Último (20)

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

Coding in Java PLEASE PROVIDE A CODE THAT RUNS PRINTS T.pdf

  • 1. (Coding in Java) (PLEASE PROVIDE A CODE THAT RUNS, PRINTS THE BOARD, HAS A CONSOLE UI CLASS AND MEETS ALL OR AT LEAST MOST OF THE REQUIREMENTS. THANK YOU.) (AND IF YOU CAN CREATE A UML CLASS DIAGRAM) Design and code an Omok application that takes all user inputs from the standard input (System.in) and displays all outputs to the standard output (System.out). Omok (a.k.a. Gomoku and Gobang), literally meaning five pieces, is a two-player strategy game typically played with go pieces --- black and white stones --- on a go board with 15x15 intersections (or places) [Wikipedia]. It is also possible to play the game with paper and pencils because stones, once placed, can't be moved or removed from the board. The two players alternate and place a stone of their color on an empty intersection. The game objective is to put one's stones in a row of five consecutive places vertically, horizontally, or diagonally. The winner is the first player to create an unbroken row of five stones. Your application shall meet the following requirements. R1. The application shall take all user inputs from the standard input (System.in) and display all output to the standard output (System.out). R2. The application shall provide two different game modes: human game and strategy game. In the first game mode, two human players play against each other, and in the second, a human player plays against the computer. Your application shall provide a realistic or reasonable playing strategy for the computer. Minimally, it should detect a winning/losing row, e.g., four consecutive stones with an open end. R3. The game board shall consist of n*n intersections (or places) on which stones of the players are placed, where n >= 15. R4. The application shall provide a way for the user to select the game mode (see R2 above). R5. The application shall provide a way for the user to place his or her stone in an empty intersection (or place) of the board. R6. The application shall show the progress of a game by displaying the current configuration of the board -- all the stones placed -- along with other status information, e.g., a player's turn. Consider using an ASCII drawing to show the board configuration. R7. When the game ends, the application shall display the outcome of the game --- a win or draw --- and highlight the winning row. R8. The application shall provide a way to quit the game, e.g., by entering a special input value. R9. You shall separate your user interface (UI) code from the model code that performs the game logic. The model code should not depend on the UI code. We suggest you create a separate class for the UI, say ConsoleUI, and make the model code independent of the UI class. That is, the UI code may depend on the model code, but not the other way around. Note you will reuse your model code in later assignments but not the UI code. 1. Code your design by naming your main (or entry point) class as Main. 2. (Bonus: 10+ points) Implement a "cheat" mode and provide a way to enable and disable it --- e.g., entering a special value when prompted for the next move. In the cheat mode, the application suggests the next move for the user. It should minimally detect a winning or losing sequence, e.g., a row of four consecutive stones with an open end. TESTING Your code should compile and run correctly with Java 10 or later versions.