Sokoban mini game

                                                  A week of java experience

   This week, I learned new knowledge: Sokoban game,

  public classname(){

         this.setsize(500.500);//Pixels set the size of the form

         this.set Title (shoko box); // set the title

         this.setdefaultcloseoperation(jframe.exit_on_close);

         this.setvisible(true);

         gp=new GamePanel();

         this.add(gp);

        Run method

       GameFrame  gf=new GameFrame();

       画板  GamePanel    gameplayer player ;// int age

       public GamePanel(){

              player =new  GamePlayer(200.300);

}

}

Drawing drawing:

  public void paint(Graphics g (the system's own brush class: rewrite)){

               player render(g);

}

Player: GamePlayer

   image image; need to guide the package

  int x int y 

 

   This is part of the code for writing the Sokoban mini-game. Although I still don't understand some parts, I will try my best to understand it. I believe I will gradually understand it all.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324651706&siteId=291194637