package com.poker.analyst.test;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import javax.imageio.ImageIO;
import javax.imageio.stream.FileImageInputStream;
import javax.swing.ImageIcon;
import com.poker.control.PokerControl;
import com.poker.data.PokerData;
import com.poker.ui.settings.tables.Table;
public class TestStacks {
/**
* @param args
*/
public static void main(String[] args) throws Exception{
PokerControl pControl = new PokerControl();
PokerData pData = new PokerData();
//BufferedImage[] hStacks = pControl.getStacksImages(pdata, playWnd);
BufferedImage pict = ImageIO.read(new File("c:\\temp\\euro1.bmp"));
Table table = pData.getRoomSettings().getTableSettings(10);
BufferedImage[] hStacks = new BufferedImage[10];
Rectangle rect;
for (int i = 0; i<10; i++){
rect = table.getRectPlayerStack(i);
hStacks[i] = pict.getSubimage(rect.x, rect.y, rect.width, rect.height);
}
hStacks = pControl.getPreparedStacksImages(pData, hStacks, 2);
String[] strStacks = pControl.getStacksStrings(pData, hStacks);
Float[] flStacks = pControl.getStacksFloats(pData, strStacks);
for (int i=0; i<flStacks.length; i++){
System.out.println(flStacks[i]);
// System.out.println(flStacks[i]);
}
}
}