private Main(int rack_size, Player ai) throws Exception{
		Main.rack_size = rack_size;
		WIN_HEIGHT = rack_size*Card.height+(rack_size-1)*Board.card_pad+2*Board.border_pad_ver+50;
		if (WIN_HEIGHT < 300) WIN_HEIGHT = 400;
		
		player_ai = ai;
		player_human = new PlayerGUI(this);
		game = Game.create(
			new Player[]{player_human, player_ai},
			rack_size, 1, false
		);
		Card.card_count = game.card_count;
		game.registerGUI(this);
		addKeyListener(new KeyAdapter(){
			@Override
			public void keyPressed(KeyEvent e) {
				if (e.getKeyChar() == 's')
					spymode_always = board.toggleSpyMode();
			}
		});
		System.out.println("Use s-key to toggle spy mode");
		
		initGUI();
	}