@Override
	public void mouseReleased(MouseEvent e) {
		Point p = e.getPoint();
		int size = display.frame.getHeight() / 12;
		int xOff = (display.frame.getWidth() - size * 9) / 2;
		int yOff = (display.frame.getHeight() - size * 9) / 4;
		for(int x = 0; x < 9; x++){
			for(int y = 0; y < 9; y++){
				Point pos = new Point(xOff + x * size, yOff + y * size);
				if(p.x > pos.x && p.x < pos.x + size && p.y > pos.y && p.y < pos.y + size){
					if(e.getButton() == 1){
						board.get(x).set(y, display.s.selected);
					} else if(e.getButton() == 3){
						board.get(x).set(y, 0);
					}
				}
			}
		}
	}