[Question]
  [
For this challenge you will print the coordinates and color of each piece at the start of a game of checkers. 
Enter the x and y (comma seperated) for every square (indexed 0-7) on a checkerboard, followed by a "r" or "b" (for red or black) where the top of the board (closer to y=0) is red and the bottom is black. newlines between pieces are required and no spaces are necessary.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so answers are scored in bytes with fewer bytes being better.
Trailing newlines are allowed but not necessary and the order must be exactly of that below.
Desired output:
```
0,0r
0,2r
0,4r
0,6r
1,1r
1,3r
1,5r
1,7r
2,0r
2,2r
2,4r
2,6r
5,1b
5,3b
5,5b
5,7b
6,0b
6,2b
6,4b
6,6b
7,1b
7,3b
7,5b
7,7b
```
  
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 26 bytes
```
2ÝD5+«v4Fy',N·yÉ+„bry3‹èJ,
```
[Try it online!](https://tio.run/##AS0A0v8wNWFiMWX//zLDnUQ1K8KrdjRGeScsTsK3ecOJK@KAnmJyeTPigLnDqEos//8 "05AB1E – Try It Online")
**Explanation**
```
2Ý                           # push [0,1,2]
  D5+                        # duplicate and add 5: [5,6,7]
     «                       # concatenate
      v                      # for each y in [0,1,2,5,6,7] do:
       4F                    # for each N in [0 ... 3] do:
         y                   # push y
          ',                 # push ","
            N·yÉ+            # push N*2+isOdd(y)
                 „br         # push "br"
                    y3‹è     # index into the string with y<3
                        J,   # join everything to a string and print
```
[Answer]
# JavaScript (ES6), 66 bytes
Includes a trailing newline.
```
f=(n=24)=>n--?f(n)+[2*(x=n>11)+(y=n>>2),n%4*2+y%2+'rb'[+x]]+`
`:''
```
### Demo
```
f=(n=24)=>n--?f(n)+[2*(x=n>11)+(y=n>>2),n%4*2+y%2+'rb'[+x]]+`
`:''
console.log(f())
```
[Answer]
# [Perl 5](https://www.perl.org/), 53 bytes
```
//&map{say"$',",$_+$'%2,$'<4?r:b}0,2,4,6for 0..2,5..7
```
[Try it online!](https://tio.run/##K0gtyjH9/19fXy03saC6OLFSSUVdR0lHJV5bRV3VSEdF3cbEvsgqqdZAx0jHRMcsLb9IwUBPz0jHVE/P/P//f/kFJZn5ecX/dX1N9QwMDQA "Perl 5 – Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~83~~ ~~81~~ ~~79~~ 78 bytes
* Saved two bytes thanks to [Tahg](https://codegolf.stackexchange.com/users/74459/tahg); golfing `x/4+2*(x/12)` to `x/4+x/12*2`.
* Saved two bytes thanks to [Kevin Cruijssen](https://codegolf.stackexchange.com/users/52210/kevin-cruijssen); golfing `x%8*2%8` to `x*2%8`.
* Saved a byte thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat).
```
x;main(){for(;x<24;)printf("%d,%d%c\n",x/4+x++/12*2,x*2%8+x/4%2,114-x/12*16);}
```
[Try it online!](https://tio.run/##FchLCoAgEADQuwQDfhEHiWA6SptQDBdZSIuB6OxWb/mi3WLsnWlfSxXyzkcTxDMGkmcr9cpigGQgQVzqYNgFzVo7jwoNK4RJfwVovA@W//ajpKf3Fw "C (gcc) – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), ~~74~~ ~~73~~ 67 bytes
```
for i in 0,1,2,5,6,7:j=i%2;exec"print`i`+','+`j`+'rb'[i>4];j+=2;"*4
```
[Try it online!](https://tio.run/##K6gsycjPM/r/Py2/SCFTITNPwUDHUMdIx1THTMfcKss2U9XIOrUiNVmpoCgzryQhM0FbXUddOyELSBclqUdn2pnEWmdp2xpZK2mZ/P8PAA "Python 2 – Try It Online")
[Answer]
# Java 8, ~~102~~ ~~96~~ ~~95~~ ~~93~~ 91 bytes
```
v->{for(int i=0;i<24;System.out.printf("%d,%d%c%n",i/4+i/12*2,i*2%8+i/4%2,i++<12?114:98));}
```
Port from [*@JonathanFrech*'s C answer](https://codegolf.stackexchange.com/a/143951/52210), after which I golfed 5 bytes myself.
[Try it here.](https://tio.run/##LY7dCoJAEIXve4pBWFh/y0Ui2OoN8iboJrrYVo0xW0VXIcJnt7GEGYYzh5nzlWpQYd3kpsyek65U18FJofmsANDYvC2UziGdJcBQYwaaX@YxuJJ2IzVVZ5VFDSkYOMA0hMdPUbec7gEPG4l7kcjzu7P5K6p7GzUtOQV3WBawjGlmnADXiY/rWHgiQE@wHYmEiSCOkxB9fzbirevKcZL/wKa/VxS45P64XkTNz5Z@P643UO4f2USam76qFtpx@gI)
**Explanation:**
```
v->{                    // Method without empty unused parameter and no return-type
  for(int i=0;i<24;     //  Loop from 0 to 24 (exclusive)
    System.out.printf("%d,%d%c%n",
                        //   Print with format:
                        //   (%d=digit; %c=character; %n=new-line)
      i/4+i/12*2,       //    Print first coordinate
      i*2%8+i/4%2,      //    Print second coordinate
      i++<12?114:98)    //    Print either 'r' or 'b'
  );                    //  End of loop
}                       // End of method
```
[Answer]
# [Bash](https://www.gnu.org/software/bash/), 59 bytes
Not the shortest, but a fun one:
```
printf %s\\n {{0,2,6}\,{0,2,4,6}r,{1,5,7}\,{1,3,5,7}b}|sort
```
[Try it online!](https://tio.run/##S0oszvj/v6AoM68kTUG1OCYmT6G62kDHSMesNkYHzDABMot0qg11THXMQWKGOsZgZlJtTXF@Ucn//wA "Bash – Try It Online")
[Answer]
# [APL (Dyalog Classic)](https://www.dyalog.com/), 38 bytes
```
(⍕⍪4/3 4~⍨⍳8),',',(⍕⍪24⍴⍋8⍴⍳2),12/'rb'
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob2pm/qO2CQZcjzra0/5rPOqd@qh3lYm@sYJJ3aPeFY96N1to6qgDIVTGyORR75ZHvd0WYGqzkaaOoZG@elGS@n@gfq60/wA "APL (Dyalog Classic) – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 35 bytes
```
8Ḷḟ3ḟ4µḂr7m2ṭ€µ€Ẏµḣ1<3Ḣị⁾rbṭj”,$µ€Y
```
[Try it online!](https://tio.run/##y0rNyan8/9/i4Y5tD3fMNwZik0NbH@5oKjLPNXq4c@2jpjWHtgKJh7v6QMKLDW2AShY93N39qHFfURJQQdajhrk6KmA1kf//AwA "Jelly – Try It Online")
Full program taking no arguments
# Explanation
```
8Ḷḟ3ḟ4µḂr7m2ṭ€µ€Ẏµḣ1<3Ḣị⁾rbṭj”,$µ€Y  Main link; no arguments
8                                    8
 Ḷ                                   Push 0 .. 8 - 1
  ḟ                                  Remove all instances of
   3                                 3
    ḟ                                Remove all instances of
     4                               4
                €                    For each in [0, 1, 2, 5, 6, 7]
       µḂr7m2ṭ€µ                     Generate all of the piece coordinates across that row
        Ḃ                            row number % 2
         r                           inclusive range up to
          7                          7
           m                         modular; take every   elements
            2                                            2
              €                      For each column coordinate
             ṭ                       Tack the row coordinate (reverse append)
                 Ẏ                   Tighten; flatten once
                                 €   For each piece coordinate (in the right order now)
                 µḣ1<3Ḣị⁾rbṭj”,$µ    Convert to its final output
                  ḣ                  Head; take the first   element(s)
                   1                                      1
                    <                Less Than; compare each element to
                     3               3
                      Ḣ              Head; take the comparison out of the list
                       ị             Index (1-indexed) into
                        ⁾rb          "rb"
                           ṭ         Tack the color character behind
                            j”,$     The coordinates joined by a comma
                            j        Join with separator
                             ”,      ","
                                  Y  Separate by newlines
```
[Answer]
# Java 8, 97 bytes
```
o->{int i=0,g;for(;i<8;i+=i==2?3:1)for(g=i%2;g<8;g+=2)System.out.println(i+","+g+(i<5?"r":"b"));}
```
[Answer]
# JavaScript (ES6), 64 bytes
This seems sufficiently different from @Arnauld's to warrant posting:
```
f=(n=0,y=n>>3,c=y>2)=>y<6?[y+c*2,n%8+y%2+'rb'[+c]]+`
`+f(n+2):''
```
**Explanation:**
```
f=(n = 0,            //the numbered square on checkerboard
   y = n >> 3,       //current row (n / 8 rounded)
   c = y > 2         //false if red pieces, true if black
  ) => 
  y < 6 ?            //if y less than 6 
    [                //  using an array automatically adds the comma
     y + c * 2,      //  0 - 2 if red pieces, 5 - 7 if black
     n%8 + y%2 +     //  n%8 returns 0, 2, 4, or 6.
                     //  y%2 returns 0 or 1.
                     //  added, they return the appropriate position (0 - 7)
     'rb'[+c]        //  'r' if red, 'b' if black.  Plus sign coerces boolean to number.
    ]+`              //  new line
    `+
    f(n+2) :         //  recurse on n+2
    ''               //else return an empty string
```
**Snippet:**
```
f=(n=0,y=n>>3,c=y>2)=>y<6?[y+c*2,n%8+y%2+'rb'[+c]]+`
`+f(n+2):''
console.log(f());
```
[Answer]
# [Python 2](https://docs.python.org/2/), 63 bytes
```
x=0;exec"print`x/8+x/24*2`+','+`x%8+x/8%2`+'rb'[x/24];x+=2;"*24
```
[Try it online!](https://tio.run/##K6gsycjPM/r/v8LWwDq1IjVZqaAoM68koULfQrtC38hEyyhBW11HXTuhQhUkYKEK4hclqUeDJGOtK7RtjayVtIxM/v8HAA "Python 2 – Try It Online")
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), ~~45~~ 44 bytes\*
-1 thanks to ngn.
Niladic function which assumes 0-based indexing (`⎕IO←0`) which is default on many systems. Prints to STDOUT.
```
↑' '⎕R','⊃,/(8 ¯8↑¨⊂⍕¨⍸∘.=⍨2|⍳8),¨¨'rb'
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qG@qp/@jtgkGXI862p0zUpOzU4uS8hOLUv4/apuorqAOlA9S11F/1NWso69hoXBovQVQ/NCKR11Nj3qnAuneHY86ZujZPupdYVTzqHezhabOoRWHVqgXJan/Bxr4H9lEAA "APL (Dyalog Unicode) – Try It Online")
`(`…`),¨¨'rb'` append "r" to each of the first group of items and "b" to each of the second:
 `⍳8` zero through eight
 `2|` division remainder when halved
 `∘.+⍨` plus table with itself on along both axes
 `⍸` indices of true values
 `⍕¨` format each (converts to strings with the pattern `d d` where each `d` is a digit)
 `⊂` enclose (so we can reuse it for each…)
 `8 ¯8↑¨` take the first nine and the last nine
now we have two lists of `d d` strings
`,/` catenation reduction (combine the two lists)
`⊃` disclose (because the reduction reduced the rank from 1 to 0)
`' '⎕R','` PCRE **R**eplace spaces with commas
`↑` mix (the all the lists into a single matrix)
---
\* In Dyalog Classic, counting `⍸` as `⎕U2378`.
[Answer]
# [Bubblegum](https://esolangs.org/wiki/Bubblegum), 59 bytes
```
00000000: 15ca b101 0030 0400 c1de 2c0a 2462 1f23  .....0....,.$b.#
00000010: d8bf 886f ae3a 531b 310d b8f0 465c 1d0e  ...o.:S.1...F\..
00000020: 24d4 48ec 5b02 2eec 4bf5 5e0e 2454 cb53  $.H.[...K.^.$T.S
00000030: 8380 0baf a5d4 e140 42f5 07              .......@B..
```
[Try it online!](https://tio.run/##Vc@9SkRBDAXg3qc44C0lJJnMddhKthDBcu0UYTI/NspW@/zXrHsbTxHS5EviF/fv8XX52Tbec4DkVuHCAubEYGNGkz6gjSvUVoVMTQBdw9fyQIvT/d1NkDB68YlS1ok6UkVO4kjCHV4mw9bcIJ3Hn3Gmw4kkmucPot3QMNS6wcpoyM4KHdGZz4w8YlItG5rnuGOhF3qP@Vf6pOWNTruRwiipxAde444c2hCL7RoGP@Jf6JanI9G2/QI "Bubblegum – Try It Online")
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), ~~37~~ ~~36~~ 35 bytes
isaacg wouldn't be proud
```
V+U3}5 7FG4p++N\,+yG?!%N2Z1?<N5\r\b
```
Explanation:
```
V+U3}5 7            For in the array [0, 1, 2, 5, 6, 7] as N
 FG4                 For in the array [0, 1, 2, 3] as G
  p                   Print without newline:
   ++N\,+yG?!%N2Z1     N, (2 * G) + 1 if N is even, else 0
  ?<N5\r\b            Output with newline "r" if N < 5 else "b"
```
This uses a simple pattern I cut down a bit. As follows:
If the `X` coord is even, use the even numbers `0, 2, 4, 6`. Else, `1, 3, 5, 7` for `Y`.
If the `X` coord is less than 5, the color (`r` or `b`) is `r`. Else, it is `b`.
[Try it online!](https://tio.run/##K6gsyfj/P0w71LjWVMHczd2kQFvbL0ZHu9LdXlHVzyjK0N7GzzSmKCbp/38A "Pyth – Try It Online")
**edit**: overnight got +40 rep on 3 different answers w00t
[Answer]
# [SOGL V0.12](https://github.com/dzaima/SOGL), 31 [bytes](https://github.com/dzaima/SOGL/blob/master/chartable.md)
```
⁰¹²⁵⁶⁷’{A4∫«Ha2\⌡HaOļ,pƧbra4>Wo
```
[Try it Here!](https://dzaima.github.io/SOGLOnline/?code=JXUyMDcwJUI5JUIyJXUyMDc1JXUyMDc2JXUyMDc3JXUyMDE5JTdCQTQldTIyMkIlQUJIYTIlNUMldTIzMjFIYU8ldTAxM0MlMkNwJXUwMUE3YnJhNCUzRVdv)
[Answer]
# Javascript (89 bytes):
```
for(x=y=0,r="r";x<7|y<8;console.log(x+","+y+r),y+=2){if(y>7)y=++x%2;if(x==3){x+=2;r="b"}}
```
Readable:
```
for(var x = y = 0, red = true; x < 7 || y < 8; y += 2) {
    if(y > 7) { //new row
        x++;
        y = x % 2;
    }
    if(x == 3) { //new color
        x += 2;
        red = false;
    }
    console.log(x + "," + y + (red ? "r" : "b") );
}
```
[Try it online!](https://tio.run/##DczRCoMwDEDRfwkMWtKN4R4c1Oxf1OlwiBmpSIL67V0fLwfut93a1Mv0W68Lv4ecRxanZHQPQiAQtakPa56x5yXxPNxm/jhFCICG4oMhVX6fRmev2hsh6qWKJZXo4XctGsung/PM@Q8 "JavaScript (Node.js) – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 27 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
8Ḷµḟ3,4pµSḂ$Ðḟj€”,ż⁾rbx12¤Y
```
A full program which prints the required output.
**[Try it online!](https://tio.run/##ATgAx/9qZWxsef//OOG4tsK14bifMyw0cOKBuFPhuIIkw5DhuJ9q4oKs4oCdLMW84oG@cmJ4MTLCpFn//w "Jelly – Try It Online")**
### How
```
8Ḷµḟ3,4p⁸SḂ$Ðḟj€”,ż⁾rbx12¤Y - Link: no arguments
8                           - literal eight
 Ḷ                          - lowered range = [0,1,2,3,4,5,6,7]
  µ                         - new monadic chain
    3,4                     - literal list = [3,4]
   ḟ                        - filter discard = [0,1,2,5,6,7]
        ⁸                   - chain's left argument = [0,1,2,3,4,5,6,7]
       p                    - Cartesian product = [[0,0],[0,1],...,[2,7],[5,0],...,[7,6],[7,7]]
            Ðḟ              - filter discard if:
           $                -   last two links as a monad:
         S                  -     sum
          Ḃ                 -     modulo by 2
                ”,          - literal comma character
              j€            - join €ach pair with a comma = [0,',',0],[0,',',2],...,[2,',',6],[5,',',1],...,[7,',',5],[7,',',7]]
                         ¤  - nilad followed by links as a nilad:
                   ⁾rb      - literal list = ['r','b']
                       12   - literal twelve
                      x     - repeat = ['r','r','r','r','r','r','r','r','r','r','r','r','b','b','b','b','b','b','b','b','b','b','b','b']
                  ż         - zip together = [[[0,',',0],'r'],[[0,',',2],'r'],...,[[2,',',6],'r'],[[5,',',1],'b'],...,[[7,',',5],'b'],[[7,',',7],'b']]
                          Y - join with newlines = [[0,',',0],'r','\n',[0,',',2],'r','\n',...,'\n',[2,',',6],'r','\n',[5,',',1],'b','\n',...,'\n',[7,',',5],'b','\n',[7,',',7],'b']
                            - implicit print (smashes the list of lists and characters
                            -                 together and prints the digits)
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~63~~ 60 bytes
```
[*0..11,*20..31].map{|x|puts [x/4,2*x%8+x[2]]*?,+"rb"[x[4]]}
```
Bitmask magic saves the byte.
[Try it online!](https://tio.run/##KypNqvz/P1rLQE/P0FBHywhIGxvG6uUmFlTXVNQUlJYUK0RX6JvoGGlVqFpoV0QbxcZq2etoKxUlKUVXRJvExtb@/w8A "Ruby – Try It Online")
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 63 bytes
```
0..2+5..7|%{$i=$_;0,2,4,6|%{"$i,$($_+$i%2)"+('r','b')[$i-ge5]}}
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfn/30BPz0jbVE/PvEa1WiXTViXe2kDHSMdExwzIV1LJ1FHRUInXVslUNdJU0tZQL1LXUU9S14xWydRNTzWNra39/x8A "PowerShell – Try It Online")
Loops over `0,1,2,5,6,7` and each iteration sets `$i` to the current number. Then loops over `0,2,4,6`. Each inner loop, we construct a string starting with `$i,` then concatenated with our inner loop's current number plus whether `$i` is even or odd (which gets us `0,2,4,6` one time and `1,3,5,7` the other time), then concatenated with either `r`ed or `b`lack based on whether `$i` is `-g`reater-than-or-`e`qual to `5`. Those strings are all left on the pipeline and the implicit `Write-Output` at program completion gives us newlines for free.
[Answer]
# [J](http://jsoftware.com/), ~~48 44 40 37~~ 31 bytes
```
(}:"1":$.|:8$#:162 69),.12#'rb'
```
[Try it online!](https://tio.run/##y/r/PzU5I19Bo9ZKyVDJSkWvxspCRdnK0MxIwcxSU0fP0EhZvShJ/f9/AA)
### How it works
```
           8$#:162 69    first 2 columns in binary, take 8 of them
         |:              transpose
       $.                format as a sparse array, kind of looks like the goal
     ":                 "to text"
 }:"1                    delete the last column
       ,.12#'rb'         append 12 rs followed by 12 bs as the last column
```
[Answer]
# [C# (.NET Core)](https://www.microsoft.com/net/core/platform), 96 bytes
```
()=>{for(int i=0;i<24;)System.Console.Write($"{i/4+i/12*2},{i*2%8+i/4%2}{(i++>11?"b":"r")}\n");}
```
[Try it online!](https://tio.run/##Tc5BC8IgGIDhc/4KkQLdqjXZIbItaucg6NCly3JWHy0FtSDE376CCDq@l5dHuok0VvUPB/qC9y/n1V0g2TXO4V1AzjceJF5LD0bj@qrkTdmNaWyLS9xTVlbhbCwF7TGUMwFLXgj2vUxro53p1PRgwSs6JAGyIoUs5wmP4wAJH80/WYx4DBTStMrzFTmRBbGExaMmTMReoJ/gaaDF2wY0ZSigwb@EMoEiiv0b "C# (.NET Core) – Try It Online")
Essentially just a port to C# of [@JonathanFrech's answer](https://codegolf.stackexchange.com/a/143951/73579). I couldn't come up with any better way of doing the math.
]