SlideShare a Scribd company logo
1 of 1
Download to read offline
Write a Java console program to design the Snake game.. Do not use Swing/Applet or any UI
components. This is a java console application. Simulate the game run through the main and
write unit tests as well. Consider the following in the code:
READ THE BELOW INSTRUCTION : INCOMPLETE/ HALF CODE WILL BE
DOWNVOTED
Modularise the code. The code should be a working solution. Do not provide half a solution.
Please make sure the entire code is visible in the post and not just a part of the code. The code is
executing without any compiler errors. Include the screenshot of the execution. Otherwise, I will
downvote. Share the screenshot of the runs and the Junits passing.
1] Code a service that runs a game of snake, 2 methods: moveSnake(direction) and
isGameOver()
2] if the Snake goes out of the boundary it should wrap in from the opposite side of the screen.
3] With every 5 steps, the snake will grow by 1
4] Optimise the code using deque
45 How would you take care of concurrent button presses, i.e if someone presses up and right at
the same time
6] Use a suitable design pattern and explain why you have used it.
7] Write unit tests to check the solution and show the screenshot of the Junit Test run.An
incomplete or failing tests will be downvoted.
MISSING ANY OF THR ABOVE REQUIREMENTS WILL GET A DOWN VOTE /DISLIKE

More Related Content

Similar to Write a Java console program to design the Snake game.. Do not use S.pdf

10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
paynetawnya
 
Cross-platform development on mobile devices
Cross-platform development on mobile devicesCross-platform development on mobile devices
Cross-platform development on mobile devices
action.vn
 
opensteerdocimagesbeta_250a.gifopensteerdocimagesbeta_.docx
opensteerdocimagesbeta_250a.gifopensteerdocimagesbeta_.docxopensteerdocimagesbeta_250a.gifopensteerdocimagesbeta_.docx
opensteerdocimagesbeta_250a.gifopensteerdocimagesbeta_.docx
hopeaustin33688
 
Тарас Леськів “Know your tool – tips and tricks for unity3d developers”
Тарас Леськів “Know your tool – tips and tricks for unity3d developers”Тарас Леськів “Know your tool – tips and tricks for unity3d developers”
Тарас Леськів “Know your tool – tips and tricks for unity3d developers”
Lviv Startup Club
 
OpenGL ES for iOS (3D Graphics)
OpenGL ES for iOS (3D Graphics)OpenGL ES for iOS (3D Graphics)
OpenGL ES for iOS (3D Graphics)
inquinity
 
AI Dominoes Project
AI Dominoes ProjectAI Dominoes Project
AI Dominoes Project
Adil Gasimov
 
Using Show Commands to Investigate Network Status Lab Grading Ru.docx
Using Show Commands to Investigate Network Status Lab Grading Ru.docxUsing Show Commands to Investigate Network Status Lab Grading Ru.docx
Using Show Commands to Investigate Network Status Lab Grading Ru.docx
dickonsondorris
 

Similar to Write a Java console program to design the Snake game.. Do not use S.pdf (20)

10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
 
Unity - Essentials of Programming in Unity
Unity - Essentials of Programming in UnityUnity - Essentials of Programming in Unity
Unity - Essentials of Programming in Unity
 
Game Development Session - 3 | Introduction to Unity
Game Development Session - 3 | Introduction to  UnityGame Development Session - 3 | Introduction to  Unity
Game Development Session - 3 | Introduction to Unity
 
Cross-platform development on mobile devices
Cross-platform development on mobile devicesCross-platform development on mobile devices
Cross-platform development on mobile devices
 
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNAOGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
OGDC2012 Cross-Platform Development On Mobile Devices_Mr.Takaaki Mizuno_DeNA
 
Unity3d scripting tutorial
Unity3d scripting tutorialUnity3d scripting tutorial
Unity3d scripting tutorial
 
opensteerdocimagesbeta_250a.gifopensteerdocimagesbeta_.docx
opensteerdocimagesbeta_250a.gifopensteerdocimagesbeta_.docxopensteerdocimagesbeta_250a.gifopensteerdocimagesbeta_.docx
opensteerdocimagesbeta_250a.gifopensteerdocimagesbeta_.docx
 
Drawing Tool
Drawing ToolDrawing Tool
Drawing Tool
 
Unity3D Tips and Tricks or "You are doing it wrong!"
Unity3D Tips and Tricks or "You are doing it wrong!"Unity3D Tips and Tricks or "You are doing it wrong!"
Unity3D Tips and Tricks or "You are doing it wrong!"
 
Тарас Леськів “Know your tool – tips and tricks for unity3d developers”
Тарас Леськів “Know your tool – tips and tricks for unity3d developers”Тарас Леськів “Know your tool – tips and tricks for unity3d developers”
Тарас Леськів “Know your tool – tips and tricks for unity3d developers”
 
Pong
PongPong
Pong
 
BSidesDelhi 2018: Headshot - Game Hacking on macOS
BSidesDelhi 2018: Headshot - Game Hacking on macOSBSidesDelhi 2018: Headshot - Game Hacking on macOS
BSidesDelhi 2018: Headshot - Game Hacking on macOS
 
OpenGL ES for iOS (3D Graphics)
OpenGL ES for iOS (3D Graphics)OpenGL ES for iOS (3D Graphics)
OpenGL ES for iOS (3D Graphics)
 
arduino
arduinoarduino
arduino
 
AI Dominoes Project
AI Dominoes ProjectAI Dominoes Project
AI Dominoes Project
 
PowerPoint Presentation For Snake Game Project In Java
PowerPoint Presentation For Snake Game Project In JavaPowerPoint Presentation For Snake Game Project In Java
PowerPoint Presentation For Snake Game Project In Java
 
Using Show Commands to Investigate Network Status Lab Grading Ru.docx
Using Show Commands to Investigate Network Status Lab Grading Ru.docxUsing Show Commands to Investigate Network Status Lab Grading Ru.docx
Using Show Commands to Investigate Network Status Lab Grading Ru.docx
 
CNC plotter controlled using Android application
CNC plotter controlled using Android applicationCNC plotter controlled using Android application
CNC plotter controlled using Android application
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact js
 
Programmers guide
Programmers guideProgrammers guide
Programmers guide
 

More from albert20021

You have already implemented a lexical analyzer in Assignment #1 and.pdf
You have already implemented a lexical analyzer in Assignment #1 and.pdfYou have already implemented a lexical analyzer in Assignment #1 and.pdf
You have already implemented a lexical analyzer in Assignment #1 and.pdf
albert20021
 
Write this in C language. This project will require students to si.pdf
Write this in C language. This project will require students to si.pdfWrite this in C language. This project will require students to si.pdf
Write this in C language. This project will require students to si.pdf
albert20021
 

More from albert20021 (20)

You observe that company A has just paid its most recent dividend D0.pdf
You observe that company A has just paid its most recent dividend D0.pdfYou observe that company A has just paid its most recent dividend D0.pdf
You observe that company A has just paid its most recent dividend D0.pdf
 
You notice that, in western society, there is an association of hype.pdf
You notice that, in western society, there is an association of hype.pdfYou notice that, in western society, there is an association of hype.pdf
You notice that, in western society, there is an association of hype.pdf
 
You have been hired as a social media consultant to develop social m.pdf
You have been hired as a social media consultant to develop social m.pdfYou have been hired as a social media consultant to develop social m.pdf
You have been hired as a social media consultant to develop social m.pdf
 
You have been hired to design a database for the University of Mpuma.pdf
You have been hired to design a database for the University of Mpuma.pdfYou have been hired to design a database for the University of Mpuma.pdf
You have been hired to design a database for the University of Mpuma.pdf
 
You have already implemented a lexical analyzer in Assignment #1 and.pdf
You have already implemented a lexical analyzer in Assignment #1 and.pdfYou have already implemented a lexical analyzer in Assignment #1 and.pdf
You have already implemented a lexical analyzer in Assignment #1 and.pdf
 
You are given n observations X1, X2, . . . , Xn that are i.i.d. and .pdf
You are given n observations X1, X2, . . . , Xn that are i.i.d. and .pdfYou are given n observations X1, X2, . . . , Xn that are i.i.d. and .pdf
You are given n observations X1, X2, . . . , Xn that are i.i.d. and .pdf
 
You decide to put your plan into Microsoft Project for easier manage.pdf
You decide to put your plan into Microsoft Project for easier manage.pdfYou decide to put your plan into Microsoft Project for easier manage.pdf
You decide to put your plan into Microsoft Project for easier manage.pdf
 
you cross two individuals that are heterozygous at the R locus. if t.pdf
you cross two individuals that are heterozygous at the R locus. if t.pdfyou cross two individuals that are heterozygous at the R locus. if t.pdf
you cross two individuals that are heterozygous at the R locus. if t.pdf
 
You are member of Chens care team. You do not speak Chinese. You fi.pdf
You are member of Chens care team. You do not speak Chinese. You fi.pdfYou are member of Chens care team. You do not speak Chinese. You fi.pdf
You are member of Chens care team. You do not speak Chinese. You fi.pdf
 
You are given a phage lysate and a culture of bacterial cells. You a.pdf
You are given a phage lysate and a culture of bacterial cells. You a.pdfYou are given a phage lysate and a culture of bacterial cells. You a.pdf
You are given a phage lysate and a culture of bacterial cells. You a.pdf
 
You are assessing a patient for syphilis. 1. What are some of the .pdf
You are assessing a patient for syphilis. 1. What are some of the .pdfYou are assessing a patient for syphilis. 1. What are some of the .pdf
You are assessing a patient for syphilis. 1. What are some of the .pdf
 
You are a computer user. In your academic work, your engagement wit.pdf
You are a computer user.  In your academic work, your engagement wit.pdfYou are a computer user.  In your academic work, your engagement wit.pdf
You are a computer user. In your academic work, your engagement wit.pdf
 
Write this in C language. This project will require students to si.pdf
Write this in C language. This project will require students to si.pdfWrite this in C language. This project will require students to si.pdf
Write this in C language. This project will require students to si.pdf
 
Write one program with a menu allowing a user to select either an In.pdf
Write one program with a menu allowing a user to select either an In.pdfWrite one program with a menu allowing a user to select either an In.pdf
Write one program with a menu allowing a user to select either an In.pdf
 
Write a statement that calls the function OutputAge. in coral code.pdf
Write a statement that calls the function OutputAge. in coral code.pdfWrite a statement that calls the function OutputAge. in coral code.pdf
Write a statement that calls the function OutputAge. in coral code.pdf
 
Written Assignments 1. Complete a comparative report on concrete ver.pdf
Written Assignments 1. Complete a comparative report on concrete ver.pdfWritten Assignments 1. Complete a comparative report on concrete ver.pdf
Written Assignments 1. Complete a comparative report on concrete ver.pdf
 
Write a MARIE program to allow the user to input 10 integers (positi.pdf
Write a MARIE program to allow the user to input 10 integers (positi.pdfWrite a MARIE program to allow the user to input 10 integers (positi.pdf
Write a MARIE program to allow the user to input 10 integers (positi.pdf
 
Write SQL statements to answer the following queriesQ1 List of n.pdf
Write SQL statements to answer the following queriesQ1 List of n.pdfWrite SQL statements to answer the following queriesQ1 List of n.pdf
Write SQL statements to answer the following queriesQ1 List of n.pdf
 
Write on the research statistics, surveillance baseline - identify a.pdf
Write on the research statistics, surveillance baseline - identify a.pdfWrite on the research statistics, surveillance baseline - identify a.pdf
Write on the research statistics, surveillance baseline - identify a.pdf
 
Write a Recipe website Project Proposal (HTML,CSS)The Project Prop.pdf
Write a Recipe website Project Proposal (HTML,CSS)The Project Prop.pdfWrite a Recipe website Project Proposal (HTML,CSS)The Project Prop.pdf
Write a Recipe website Project Proposal (HTML,CSS)The Project Prop.pdf
 

Recently uploaded

Orientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfOrientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdf
Elizabeth Walsh
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 

Recently uploaded (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Orientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfOrientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdf
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdfDiuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
Diuretic, Hypoglycemic and Limit test of Heavy metals and Arsenic.-1.pdf
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Write a Java console program to design the Snake game.. Do not use S.pdf

  • 1. Write a Java console program to design the Snake game.. Do not use Swing/Applet or any UI components. This is a java console application. Simulate the game run through the main and write unit tests as well. Consider the following in the code: READ THE BELOW INSTRUCTION : INCOMPLETE/ HALF CODE WILL BE DOWNVOTED Modularise the code. The code should be a working solution. Do not provide half a solution. Please make sure the entire code is visible in the post and not just a part of the code. The code is executing without any compiler errors. Include the screenshot of the execution. Otherwise, I will downvote. Share the screenshot of the runs and the Junits passing. 1] Code a service that runs a game of snake, 2 methods: moveSnake(direction) and isGameOver() 2] if the Snake goes out of the boundary it should wrap in from the opposite side of the screen. 3] With every 5 steps, the snake will grow by 1 4] Optimise the code using deque 45 How would you take care of concurrent button presses, i.e if someone presses up and right at the same time 6] Use a suitable design pattern and explain why you have used it. 7] Write unit tests to check the solution and show the screenshot of the Junit Test run.An incomplete or failing tests will be downvoted. MISSING ANY OF THR ABOVE REQUIREMENTS WILL GET A DOWN VOTE /DISLIKE