Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

E 4 Lab4 ~ Version control Project Node.java LinkedList.java GameGrid.java x v CG Lab4 D:ahmadnadeem Lab4 public class GameGrid { no usages > m.idea 11

image text in transcribed
E 4 Lab4 ~ Version control Project Node.java LinkedList.java GameGrid.java x v CG Lab4 D:\\ahmadnadeem\\ Lab4 public class GameGrid { no usages > m.idea 11 public void run() { no usages 28 ~src while (* condition to check if movelist is not empty */) { 29 GameGrid Node removedNode = moveList . removeNode() ; 30 LinkedList if (removedNode != null) { 31 Node // Update grid with a value other than 0 or 1, e.g., 2 32 grid[removedNode .xPosition ] [removedNode. yPosition] = 2; // .gitignore 33 Lab4.iml 34 > b External Libraries 35 > Scratches and Consoles 36 // Print out the grid 37 printGrid() ; 38 39 // Print the total number of player moves 40 System. out. printin("Total player moves: " + totalMoves); 41 42 // Add test code for LinkedList 43 LinkedList oTestLL = moveList; // Use the actual name if different 44 try { 45 oTestLL. addNode( x: 124, y: 0); 46 System. out. printin("***test-add-" + oTestLL.getHeadNode() .xPos 47 } catch (Exception ex) { 48 System. out . printin("###test-add") ; 49 50 51 try { if (nToctl | nomnvalinda( ) voncition -- Problems File 9 Project Errors Server-Side Analysis (NEW) Vulnerable Dependencies GameGrid.java D:\\ahmadnadeem\\Lab4\\src 9 problems Expression expected :17 @ Expression expected :28 A Class 'GameGrid' is never used :1 A Field 'grid' may be 'final' :3 A Field 'moveList' may be 'final' :4 D A Constructor 'GameGrid(int, int)' is never used :6 A Method 'run()' is never used :11 A Variable '' is never used :62 A Commented out code (2 lines) :23 90

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions