package lab.games; /** * A frame consists of 5 lines of ASCII characters. * Each line contains at most 80 characters. * * @author Franck van Breugel */ public class Frame { private String content; /** * The height of a frame, that is, the number of lines of a frame. */ public static final int HEIGHT = 5; /** * The width of a frame, that is, the maximum number of characters * of each line of a frame. */ public static final int WIDTH = 80; /** * Initializes this frame with the given content. * * @param content the content of this frame. * @pre. content != null */ public Frame(String content) { this.setContent(content); } /** * Returns the content of this frame. * * @return the content of his frame. */ private String getContent() { return this.content; } /** * Sets the content of this frame to the given content. * * @param content the new content of this frame. * @pre. content != null */ private void setContent(String content) { this.content = content; } /** * Returns the content of this frame. * * @return the content of this frame. */ public String toString() { return this.getContent(); } }