MASON-INTEREST-L Archives

April 2018

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stewart Aitken <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Mon, 2 Apr 2018 15:39:31 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
The 32 is thee code fault indicated and the controller is shown below.
Pretty much standard, I think.


public static void main(String[] args) {
SimEnviro2WithUI sim = new SimEnviro2WithUI();
Console c = new Console(sim);
32 c.setVisible(true);

}

public void init(Controller c) {
super.init(c);
display = new Display2D(450.0D, 400.0D, this);
displayFrame = display.createFrame();
c.registerFrame(displayFrame);
displayFrame.setVisible(true);
portrayal = new ObjectGridPortrayal2D() {
public Portrayal getDefaultPortrayal() {
return new OvalPortrayal2D(Color.red, 1.0D) {
public void draw(Object object, Graphics2D graphics, DrawInfo2D info) {
if(object != null) {
super.draw(object, graphics, info);
}

}
};
}
};

display.attach(this.portrayal, "von Neumann single offspring portrayal");
display.setBackdrop(Color.white);
}

ATOM RSS1 RSS2