Im making a program to play pacman and have several classes, i have a Wall class, a Goast class a Pacman class a Pellot class and a Board class. all of them are compiled without errors except board, it is not complete but what i have is not compiling, what i have is
import java.awt.*;
import javax.swing.*;
public class Board{
private int xDim_=1000;
private int yDim_=900;
private Pacman pacman_=new Pacman(475,525,0);
private Goast greenredGoast_=new Goast(525,350,2,Color.RED);
private Goast onageGoast_=new Goast(525,275,1, Color.ORANGE);
private Goast pinkGoast_=new Goast(425,350,2,Color.MAGENTA);
private Goast blueGoast_=new Goast(425,275,0,Color.CYAN);
Wall[] walls = new Wall[22];
walls[0]=new Wall(50,850,900,50);
walls[1]=new Wall(0,0,50,900);
walls[2]=new Wall(50,0,900,50);
walls[3]=new Wall(125,125,50,150);
im getting 100 errors that are on every entry in creating a new Wall, the errors are as follows:
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: ';' expected
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: illegal start of type
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: <identifier> expected
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: ';' expected
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: illegal start of type
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: <identifier> expected
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: <identifier> expected
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: illegal start of type
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: <identifier> expected
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: <identifier> expected
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: illegal start of type
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: <identifier> expected
walls[0]=new Wall(50,850,900,50);
^
Board.java:12: error: ';' expected
walls[0]=new Wall(50,850,900,50);
^
and im getting that for every single Wall. i cant figure out what is wrong someone PLEASE help!! thanks
Wallclass look like?