Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updated instructions and StartScreen
  • Loading branch information
john committed Apr 25, 2015
1 parent 7f25e84 commit 1f1e62c
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 1 deletion.
15 changes: 14 additions & 1 deletion MerchantRPGCSE2102/src/config/instructions.txt
@@ -1 +1,14 @@
Testing Instructions file
============= INSTRUCTIONS ===============

-- Controls --
- Use arrow keys for movement
- Use 'F' key to initiate a transaction when next to a merchant
- Use 'N' key to start a new day

-- Game Information --
- The objective is the earn as much money as you can buying and selling
- Merchants will buy and sell only specific items
- The prices of these items changes daily! Remember to buy low and sell high!
- Merchants only have a limited amount of cash, this increases over time
- You can only do a limited number of transactions before the shops close
- Remember, the moment you enter a transaction time passes. Prioritize!
36 changes: 36 additions & 0 deletions MerchantRPGCSE2102/src/model/Object.java
@@ -0,0 +1,36 @@
package model;

public class Object {
private int col, row;
private String name;

public Object(int row, int col, String name) {
this.setCol(col);
this.setRow(row);
this.setName(name);
}

public int getCol() {
return col;
}

public void setCol(int col) {
this.col = col;
}

public int getRow() {
return row;
}

public void setRow(int row) {
this.row = row;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}
45 changes: 45 additions & 0 deletions MerchantRPGCSE2102/src/view/StartScreenPanel.java
@@ -0,0 +1,45 @@
package view;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.LayoutManager;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JPanel;

public class StartScreenPanel extends JPanel {

private static final long serialVersionUID = 1L;
BufferedImage background = null;


StartScreenPanel(LayoutManager lm) {
super(lm);
background = loadImage("background.jpg");
}

@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
g2d.drawImage(background, 0, 0, null);

}

public BufferedImage loadImage(String fileName) {

BufferedImage image = null;

try {
image = ImageIO.read(new File("src/images/" + fileName));
} catch (IOException e) {
e.printStackTrace();
}

return image;
}

}

0 comments on commit 1f1e62c

Please sign in to comment.