-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCryptoboxSim.java
More file actions
51 lines (50 loc) · 1.67 KB
/
Copy pathCryptoboxSim.java
File metadata and controls
51 lines (50 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class MyWorld here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class CryptoboxSim extends World
{
/**
* Constructor for objects of class MyWorld.
*
*/
public CryptoboxSim()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(600, 400, 1);
prepare();
}
/**
* Prepare the world for the start of the program.
* That is: create the initial objects and add them to the world.
*/
private void prepare()
{
CryptoboxEdge cryptoboxedge = new CryptoboxEdge();
addObject(cryptoboxedge,250,205);
CryptoboxEdge cryptoboxedge2 = new CryptoboxEdge();
addObject(cryptoboxedge2,280,205);
CryptoboxEdge cryptoboxedge3 = new CryptoboxEdge();
addObject(cryptoboxedge3,310,205);
CryptoboxEdge cryptoboxedge4 = new CryptoboxEdge();
addObject(cryptoboxedge4,340,205);
Robot.reset();
Ground ground = new Ground();
addObject(ground,300,250);
FlippyBoi flippyboi = new FlippyBoi();
addObject(flippyboi,500,50);
ReloadButton reloadbutton = new ReloadButton();
addObject(reloadbutton,500,300);
PlaceBlock placeblock = new PlaceBlock();
addObject(placeblock,550,300);
Key key = new Key();
addObject(key,100,50);
CryptoBox cryptobox = new CryptoBox();
addObject(cryptobox,100,200);
Timer timer = new Timer();
addObject(timer,300,300);
}
}