package com.codegym.games.snake;
import com.codegym.engine.cell.*;
public class SnakeGame extends Game{
public static final int WIDTH = 15;
public static final int HEIGHT = 15;
int width = 20;
int height = 20;
public void initialize(){
setScreenSize(WIDTH,HEIGHT);
}
}
class Game{
public void setScreenSize(int a, int b){
}
}
I have problem with "The SnakeGame class must inherit the Game class"
What should I do ?Problem with Snake Game
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Emil Valentin Toma
3 September 2019, 05:57
Hi Maciej,
You already have a class named Game in the javafx installation (presuming you write code in your IntelliJ), it's no need to create another one of your own. As soon as you rename or comment your own Game class, when you start typing "set" (as in setScreenSize), you'll see multiple hints popping up. The set methods you see there belong to the original "Game" class.
If you write code in the codegym interface, after you rename/comment your own Game class, you should be able to see about the same hints as you would in IntelliJ when typing "set".
0