Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed pacman-java/App.class
Binary file not shown.
Binary file removed pacman-java/PacMan$Block.class
Binary file not shown.
Binary file removed pacman-java/PacMan.class
Binary file not shown.
Binary file removed pacman-java/desktop.ini
Binary file not shown.
Binary file removed pacman-java/out/desktop.ini
Binary file not shown.
Binary file removed pacman-java/out/production/desktop.ini
Binary file not shown.
Binary file removed pacman-java/out/production/pacman-java/App.class
Binary file not shown.
Binary file not shown.
Binary file removed pacman-java/out/production/pacman-java/PacMan.class
Binary file not shown.
Binary file removed pacman-java/out/production/pacman-java/blueGhost.png
Binary file not shown.
Binary file removed pacman-java/out/production/pacman-java/cherry.png
Binary file not shown.
Binary file removed pacman-java/out/production/pacman-java/cherry2.png
Binary file not shown.
Binary file removed pacman-java/out/production/pacman-java/desktop.ini
Binary file not shown.
Binary file removed pacman-java/out/production/pacman-java/orangeGhost.png
Binary file not shown.
11 changes: 0 additions & 11 deletions pacman-java/out/production/pacman-java/pacman-java.iml

This file was deleted.

11 changes: 0 additions & 11 deletions pacman-java/pacman-java.iml

This file was deleted.

Binary file removed pacman-java/pacmanDown.png
Binary file not shown.
Binary file removed pacman-java/pacmanLeft.png
Binary file not shown.
Binary file removed pacman-java/pacmanRight.png
Binary file not shown.
Binary file removed pacman-java/pacmanUp.png
Binary file not shown.
Binary file removed pacman-java/pinkGhost.png
Binary file not shown.
Binary file removed pacman-java/powerFood.png
Binary file not shown.
Binary file removed pacman-java/redGhost.png
Binary file not shown.
Binary file removed pacman-java/scaredGhost.png
Binary file not shown.
Binary file removed pacman-java/wall.png
Binary file not shown.
68 changes: 35 additions & 33 deletions pacman-java/App.java → src/game/App.java
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
import javax.swing.*;
import java.awt.*;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;

public class App {
public static void main(String[] args) throws Exception {
int rowCount = 21;
int columnCount = 19;
int tileSize = 32;
int boardWidth = columnCount * tileSize;
int boardHeight = rowCount * tileSize;

JFrame frame = new JFrame("Pac Man");

// Set icon for taskbar and title bar.
ImageIcon icon = new ImageIcon(App.class.getResource("pacmanRight.png"));
frame.setIconImage(icon.getImage());

// frame.setVisible(true);
frame.setSize(boardWidth, boardHeight);
frame.setLocationRelativeTo(null);
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

PacMan pacmanGame = new PacMan();
frame.add(pacmanGame);
frame.pack();
pacmanGame.requestFocus();
frame.setVisible(true);

}
}
package game;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;

public class App {
public static void main(String[] args) throws Exception {
int rowCount = 21;
int columnCount = 19;
int tileSize = 32;
int boardWidth = columnCount * tileSize;
int boardHeight = rowCount * tileSize;

JFrame frame = new JFrame("Pac Man");

// Set icon for taskbar and title bar.
ImageIcon icon = new ImageIcon(App.class.getResource("../resources/pacmanRight.png"));
frame.setIconImage(icon.getImage());

// frame.setVisible(true);
frame.setSize(boardWidth, boardHeight);
frame.setLocationRelativeTo(null);
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

PacMan pacmanGame = new PacMan();
frame.add(pacmanGame);
frame.pack();
pacmanGame.requestFocus();
frame.setVisible(true);

}
}
Loading