Left Center Right (LCR) code golf At a party, I was introduced to the game LCR. Now it's not a great game as there's no skill but only random chance. But it got me thinking, I could code this, and I made a quick program in R to model the game. 

Rules of the game modified from Wikipedia to match how we played:


  Each player receives at least 3 chips. Players take it in turn to roll
  three six-sided dice, each of which is marked with "L", "C", "R" on
  one side, and a single dot on the three remaining sides. For each "L"
  or "R" thrown, the player must pass one chip to the player to their
  left or right, respectively. A "C" indicates a chip to the center
  (pot). A dot has no effect.
  
  If a player has fewer than three chips left, they are still in the
  game but their number of chips is the number of dice they roll on
  their turn, rather than rolling all three. When a player has zero
  chips, they pass the dice on their turn, but may receive chips from
  others and take their next turn accordingly. The winner is the last
  player to put chips into the center.


Contest: write a program in your language of choice that takes input for the number of players and the number of starting chips and simulates a game of LCR, showing the state of the game after each player has rolled. 

For example, a game might be output as: 

[[[3,3,3,3],0],[[1,4,3,4],0],[[1,4,3,4],0],[[1,4,1,4],2],[[1,4,1,2],4],
[[0,4,1,3],4],[[0,3,2,3],4],[[0,3,0,3],6],[[0,3,1,1],7],[[0,3,1,1],7],
[[2,0,1,1],8],[[2,0,0,1],9],[[2,0,0,0],10],[[0,1,0,0],11],
[[1,0,0,0],11],[[1,0,0,0],11],[[1,0,0,0],11],[[0,0,0,0],12]]


ht: JonathanAllan

The output doesn't have to look exactly like this, but it should be easy to discern the dice roll, how many chips each player has, and how many chips the centre has for each turn.

It's code golf so the shortest code wins.
Emacs Lisp, 279 bytes

(defmacro n(i)`(incf(nth ,i c)))
(defun f(p s)(g(let((a'(0)))(dotimes(i p)(push s a))(princ a))0 p))
(defun g(c v p)(dotimes(i(min(nth v c)3))(decf(nth v c))(case(random 6)(0(n(mod(1- v)p)))(1(n(mod(1+ v)p)))(2(n p))(t(n v))))(princ c)(or(eq(-sum c)(nth p c))(g c(mod(1+ v)p)p)))


Use this function as (f 4 3).

Better readable version:

(defmacro n (i) `(incf (nth ,i c)))

(defun f(p s)
  (g
   (let ((a '(0)))
     (dotimes (i p)
       (push s a))
     (princ a))
   0
   p))

(defun g (c v p)
  (dotimes (i (min (nth v c) 3))
    (decf (nth v c))
    (case (random 6)
      (0 (n (mod (1- v) p)))
      (1 (n (mod (1+ v) p)))
      (2 (n p))
      (t (n v))))
    (princ c)
    (or (eq (-sum c) (nth p c))
    (g c (mod (1+ v) p) p)))


Output example:

(3 3 3 3 0)(1 4 3 4 0)(2 2 4 4 0)(2 2 2 5 1)(4 2 2 3 1)(2 2 2 4 2)(2 1 3 4 2)(2 2 0 4 4)(2 2 0 4 4)(1 2 0 4 5)(2 1 0 4 5)(2 1 0 4 5)(2 1 1 3 5)(0 1 1 3 7)(1 0 1 3 7)(1 0 1 3 7)(1 0 3 1 7)(1 0 3 1 7)(1 0 3 1 7)(1 1 2 1 7)(1 1 3 0 7)(0 1 3 0 8)(1 0 3 0 8)(1 1 1 1 8)(1 1 2 0 8)(0 1 2 1 8)(0 1 2 1 8)(0 1 1 1 9)(0 1 1 1 9)(0 1 1 1 9)(0 1 1 1 9)(0 1 1 1 9)(0 1 1 0 10)(0 1 1 0 10)(0 0 1 0 11)(0 0 1 0 11)(0 0 1 0 11)(0 0 1 0 11)(0 0 1 0 11)(0 0 0 0 12)