Posts

Showing posts from February 20, 2019

Drawing self-improving cards: get good or remove bad first?

Image
2 1 $begingroup$ Suppose there is a single player card game in which there is a deck of $n$ cards. A card is either red, green or blank. Initially, the deck consists of $r_0$ red, $g_0$ green and $b_0$ blank cards such that $r_0+g_0+b_0 = n$ . All cards initially are put into a draw pile. If variable numbers are difficult, we may assume $n=20,r_0=9,g_0=1,b_0=10$ . Each turn, the player draws cards from his draw pile until the number of drawn red cards is equal to the number of drawn green cards plus 3 (or until there is nothing left to draw). For instance, he may draw RRR or RGGRRRR or BGRBRRBBR . Each drawn card, regardless of its color, gains 1 point. The goal of the game is to score many points. After each turn, the drawn cards are put to the side into a secondary pile. Whenever the draw pile is exhaus

Binding arrow keys in GNU Screen

Image
up vote 2 down vote favorite 1 I'm a newcomer to GNU Screen and so far I'm liking it. However there is something I can't quite get to work the way I could in tmux. I want to make it so that Ctrl-a "arrow key" changes focus between my windows. I typically have many splits in my terminal window. I've searched around but been unable to find a config that works. Note I do not want to switch between windows, just the focus. Bonus points if someone could explain the difference between "bind" and "bindkey" to my addled brain. Cheers shortcut-keys gnu-screen share | improve this question asked Apr 6 '16 at 16:15