Sokoban GamePlayer

import java.awt.Graphics;
import java.awt.Image;
import javax.swing.ImageIcon;
public class GamePlayer {
   Image im;//Picture;
   int x,y;//Coordinates;
   //Constructor, assign values ​​to properties/ Initial value property;
   public GamePlayer(int x,int y){
   ImageIcon icon=new ImageIcon("player.png");
   im=icon.getImage();
   this.x=x;
   this.y=y;
   }
   // The method to draw the player;
   public void render(Graphics g){
  g.drawImage(im,x,y,null);
   }
   }

Guess you like

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