Package com.sirenian.hellbound.domain

Examples of com.sirenian.hellbound.domain.Segment


  private static Segments rotation(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) {
    return new Segments(p(x1, y1), p(x2, y2), p(x3, y3), p(x4, y4));
  }
 
  private static Segment p(int x, int y) {
    return new Segment(x, y);
  }
View Full Code Here


 
  public void fillRect(int x, int y, int width, int height) {
    int scaledX = (x - pitPanel.getX()) / scale;
    int scaledY = (y - pitPanel.getY()) / scale;
   
    pitMap.put(new Segment(scaledX, scaledY), color);
  }
View Full Code Here

  public void fillRect(int x, int y, int width, int height) {
    int scaledX = x / scale;
    int scaledY = y / scale;
   
        if (scaledX >= 0 && scaledX < pitWidth && scaledY >=0 && scaledY < pitHeight) {
            pitMap.put(new Segment(scaledX, scaledY), color);
            asciiRepresentation[scaledY][scaledX] = colormap.getTypeFor(color).toAscii();
        }
  }
View Full Code Here

                StringBuffer buffer = new StringBuffer();
                buffer.append("something containing ").append(System.getProperty("line.separator"));

                for (int y = 0; y < HEIGHT; y++) {
                    for (int x = 0; x < WIDTH; x++) {
                        if (segments.contains(new Segment(x, y))) {
                            buffer.append(Hellbound.COLORMAP.getTypeFor(color).toString());
                        } else {
                            buffer.append(GlyphType.PIT.toString());
                        }
                    }
View Full Code Here

import com.sirenian.hellbound.gui.RenderedPit;

public class TheGlyphShouldFallToTheBottom extends HellboundOutcome {
    public void verifyAnyTimeIn(World world) {
        Segments expectedSegments = new Segments(
                new Segment(2, 11),
                new Segment(3, 11),
                new Segment(4, 11),
                new Segment(3, 12)
        );
        Color expectedColor = Hellbound.COLORMAP.getColorFor(GlyphType.T);
        RenderedPit pit = getPit(world);
        Ensure.that(pit, contains(expectedSegments, expectedColor));
    }
View Full Code Here

            public String toString() {               
                StringBuffer buffer = new StringBuffer();
                buffer.append("something containing ").append(System.getProperty("line.separator"));
                for (int y = 0; y < Hellbound.HEIGHT; y++) {
                    for (int x = 0; x < Hellbound.WIDTH; x++) {
                        if (segments.contains(new Segment(x, y))) {
                            buffer.append(Hellbound.COLORMAP.getTypeFor(color).toAscii());
                        } else {
                            buffer.append(GlyphType.PIT.toAscii());
                        }
                    }
View Full Code Here

TOP

Related Classes of com.sirenian.hellbound.domain.Segment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.