@@ -0,0 +1,1173 @@
+/*%0A * To change this license header, choose License Headers in Project Properties.%0A * To change this template file, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage consolealiensgame;%0A%0A/**%0A *%0A * @author guberti%0A */%0Apublic class View %7B%0A    // Views are %22windows%22 into the game board%0A    // Views are always square, for the time being%0A    // Views store game tiles as an array of integers%0A    // -1 means empty%0A    // Any number that is %3E= 0 is the power of an alien on that tile%0A    %0A    private int%5B%5D%5B%5D board;%0A    %0A    // Corner refers to top left of board%0A    %0A    private int topX;%0A    private int topY;%0A    %0A    public View (int topX, int topY, int%5B%5D%5B%5D board) %7B%0A        this.board = board;%0A        this.topX = topX;%0A        this.topY = topY;%0A    %7D%0A    %0A    public boolean isAlienAtPos(int x, int y) throws CantSeeSquareException %7B%0A        if (topX + board.length %3E x %7C%7C%0A                topX %3C x %7C%7C%0A                topY + board.length %3E y %7C%7C%0A                topY %3C y) %7B%0A            throw new CantSeeSquareException();%0A        %7D%0A        return board%5BtopX - x%5D%5BtopY - y%5D %3E -1;%0A    %7D%0A    %0A    %0A%7D%0A%0Aclass CantSeeSquareException extends Exception %7B%7D

Add in some preliminary code to allow aliens to see other squares