Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Updated instructions and StartScreen
- Loading branch information
Showing
3 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
} |