Browse Source

Fix getWidth()/getHeight(), so non-square grids work.

master
Ben Kurtovic 12 years ago
parent
commit
b606aa1796
2 changed files with 2 additions and 3 deletions
  1. +2
    -2
      src/Grid.java
  2. +0
    -1
      src/Render.java

+ 2
- 2
src/Grid.java View File

@@ -35,11 +35,11 @@ public class Grid {
}

public int getWidth() {
return _grid.length;
return _grid[0].length;
}

public int getHeight() {
return _grid[0].length;
return _grid.length;
}

public Patch getPatch(int x, int y) {


+ 0
- 1
src/Render.java View File

@@ -248,7 +248,6 @@ public class Render extends Canvas implements Runnable, MouseListener,
public void mouseMoved(MouseEvent e) {
}
// Affects the algorithms menu
@Override
public void actionPerformed(ActionEvent event) {
if ("pause".equals(event.getActionCommand())) {


Loading…
Cancel
Save