Minesweeper (Part 2/16)

  • 3
  • Locked
Our playing field is kind of small, don't you think? It should be 9x9 cells: 1) There is a setScreenSize(int, int) method to set the size of the field 2) This method takes width and height arguments (the number of cells wide and high) 3) the dimensions of the field will be used frequently, so it's
You can't complete this task, because you're not signed in.
Comments (16)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Level 22 , San Diego, United States
27 February, 20:49
See notes on superclass and subclass extends --
Level 8 , Singapore, Singapore
24 January 2022, 16:44
I am confused on why line 1 below is having starting with the keyword "Package" whereas line 2 with "Import" package com.codegym.games.minesweeper; import com.codegym.engine.cell.*; I came back on this after a while so not able to connect the dots. Kindly help.
Level 20 , Hungary
7 November 2022, 18:08
package it is your worksapce where you class is !! import we use extra class they provided
Level 3 , Gurgaon, India
29 January, 14:53
Package is your program's directory structure and where as Import is used to import the inherited Game class predefined methods.
shining Student
22 November 2021, 16:12
I don't understand how to do this question and why the answer is like. Who can explain it to me.
Level 17 , Poland
23 November 2021, 13:29
You have to declare variable which got the dimensions of field:
private static final int SIDE = 9;
You have to create a method which is responsible for initializing the field. Inside this method you are calling to the method setScreenSize
public void initialize(){
And you have to create method setScreenSize which is responsible for calling another, inherited method setScreenSize, and you bring x and y to inherited method setScreenSize;
public void setScreenSize(int x , int y){
    super.setScreenSize(x, y);
Level 12 , Corredor
9 April 2021, 18:06
Hey everybody... I don't know if I missed something... but I didn't study inherit or something like that so far in the material... So, are we going to study that in a after lesson? Or where can I find that lesson?
Level 22 , Zabrze, Poland
18 October 2020, 09:51
The IDE doesn't import the engine(import com.codegym.engine.cell.*;)A nybody knows why? (It works perfect on codygym's website ).
Level 41
2 November 2020, 06:45
Please post your question with the attached solution in the section Help.
Level 17 , Chengdu
8 March 2021, 11:10
Congratulations on level 41.
Level 4 , Krakow, Poland
4 May 2020, 15:19
There's an error: cannot find symbol method setScreenSize(int, int), what's the problem?
Sarah Beth Benes
Level 3 , Savannah, United States
17 June 2020, 18:58
It should say setScreenSize (SIDE, SIDE); The SIDE is the int variable,.
Level 3 , Saint Louis, France
22 January 2020, 08:41
It doesn't accept
public void initialise()
Brad Reed
Level 19 , Hartford, United States
10 July 2020, 18:14
it requires the American spelling: initialize
Level 0
13 December 2019, 13:40
comment resolou cette exo svp
Level 22 , Hungary
15 July 2019, 17:55
super.setScreenSize(SIDE,SIDE); should be correct too, but it doesn't accept it...