package jp.co.iti.hedgehog;

class Bark {
	private byte[]	bytes;
	private int		width;
	private int		height;
	private int		remainder;
	
	public Bark(byte[] bytes, int width){
		this.bytes	= bytes;
		this.width	= width;
		
		int len = bytes.length;
		height		= len / width;
		remainder	= len % width;
	}
	
	public Bark(int size, int width){ this(new byte[size], width); }
	
	public byte[] get(){ return bytes; }
	
	public byte get(int x, int y){ return bytes[y * width + x]; }
	public void set(byte v, int x, int y){ bytes[y * width + x] = v; }
	
	public int getWidth(){		return width;		}
	public int getHeight(){		return height;		}
	public int getRemainder(){	return remainder;	}
}
