The.
This commit is contained in:
@@ -14,4 +14,15 @@
|
|||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1731211035825</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
@@ -14,4 +14,15 @@
|
|||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1731211035839</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
@@ -14,4 +14,15 @@
|
|||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1731211035842</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
@@ -112,13 +112,13 @@ class Examples {
|
|||||||
WorldCanvas c = new WorldCanvas(w, h);
|
WorldCanvas c = new WorldCanvas(w, h);
|
||||||
WorldScene s = new WorldScene(w, h);
|
WorldScene s = new WorldScene(w, h);
|
||||||
|
|
||||||
return
|
return game.launch();
|
||||||
c.drawScene(s.placeImageXY(gameImg, w/2, h/2))
|
//c.drawScene(s.placeImageXY(gameImg, w/2, h/2))
|
||||||
//c.drawScene(s.placeImageXY(incomplete, (int) (incomplete.getWidth()/2), 100))
|
//c.drawScene(s.placeImageXY(incomplete, (int) (incomplete.getWidth()/2), 100))
|
||||||
//c.drawScene(s.placeImageXY(exampleFeedback.draw(), 100, 100))
|
//c.drawScene(s.placeImageXY(exampleFeedback.draw(), 100, 100))
|
||||||
//c.drawScene(s.placeImageXY(redDot.draw(), 100, 100))
|
//c.drawScene(s.placeImageXY(redDot.draw(), 100, 100))
|
||||||
//c.drawScene(s.placeImageXY(dotsOne.draw(), 250, 250))
|
//c.drawScene(s.placeImageXY(dotsOne.draw(), 250, 250))
|
||||||
&& c.show();
|
//&& c.show();
|
||||||
//true;
|
//true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@ class Util {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A game state.
|
// A game state.
|
||||||
class Game {
|
class Game extends World {
|
||||||
static ILoDot DEFAULTDOTS = new ConsDot(new Dot(Color.RED), new ConsDot(new Dot(Color.GREEN), new ConsDot(new Dot(Color.BLUE), new MtDot())));
|
static ILoDot DEFAULTDOTS = new ConsDot(new Dot(Color.RED), new ConsDot(new Dot(Color.GREEN), new ConsDot(new Dot(Color.BLUE), new MtDot())));
|
||||||
static GameConf DEFAULTCONF = new GameConf(true, 5, 5, DEFAULTDOTS);
|
static GameConf DEFAULTCONF = new GameConf(true, 5, 5, DEFAULTDOTS);
|
||||||
|
|
||||||
@@ -170,6 +170,16 @@ class Game {
|
|||||||
// Convenience constructor using default config and starting values.
|
// Convenience constructor using default config and starting values.
|
||||||
Game() { this(DEFAULTCONF, DEFAULTCONF.options.gen(DEFAULTCONF.len), DEFAULTCONF.nguesses, new MtGuess(), false, false); }
|
Game() { this(DEFAULTCONF, DEFAULTCONF.options.gen(DEFAULTCONF.len), DEFAULTCONF.nguesses, new MtGuess(), false, false); }
|
||||||
|
|
||||||
|
public WorldScene makeScene() {
|
||||||
|
WorldScene bg = this.getEmptyScene();
|
||||||
|
WorldImage dot = new Dot(Color.RED).draw();
|
||||||
|
return bg.placeImageXY(dot , (int)dot.getWidth(), (int)dot.getHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean launch() {
|
||||||
|
return this.bigBang(100, 100);
|
||||||
|
}
|
||||||
|
|
||||||
// Draw the current game state.
|
// Draw the current game state.
|
||||||
WorldImage draw() {
|
WorldImage draw() {
|
||||||
return new AboveAlignImage(AlignModeX.LEFT, this.draw_sol(), this.draw_guesses(), this.draw_options());
|
return new AboveAlignImage(AlignModeX.LEFT, this.draw_sol(), this.draw_guesses(), this.draw_options());
|
||||||
|
@@ -14,4 +14,15 @@
|
|||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1731211035844</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
Reference in New Issue
Block a user