Order and Chaos and Codegolf
JavaScript, 360

Edit Modified interactive game, should run even in MSIE

As requested, text based game, input via popup, output in console (so to have a monospaced font).

Quit game with 'q' or clicking 'cancel' at prompt.

Not using ES5 features, it should run on any moder browser (where you can have a JS console panel)



b='\n......'.repeat(6).split('');
for(h=t=0;!h&amp;t&lt;36;)
{
  i=prompt();
  if(i=='q')i=null;
  i=i.match(/([0-5]) ([0-5]) ([XO])/);
  m='INVALID';
  if(b[p=i?i[2]*7-~i[1]:0]=='.')
  {
    ++t;
    b[p]=i[3];
    m=b.join('');
    for(x=z='',c=0;c++&lt;6;)
      for(x+='_',z+='_',r=0;r&lt;6;r++)
        x+=b[c+r*7],z+=b[c&lt;4?c-1+r*8:c+1+r*6];
    h=(/X{5}|O{5}/.test(b.join('')+x+z))
  }
  console.log(m);
}
console.log("P"+(2-h)+" WINS")




Now, some more fun Interactive and graphic version, run snippet to play.



function start() {
  b=Array(7).join('\n......').split('');
  t=0;
  $('#O').text('');
  $('table')[0].className='';
  show();
  $('th').eq(1).html('Left-click: O&lt;br&gt;Right-click: X');
  $('#B')
  .off('mouseup')
  .on('mouseup','td.F',function(ev){
    var x,y, p=~~this.id.slice(1)
    x=p%7-1
    y=p/7|0
    b[p]=ev.which &gt; 1 ?'X':'O';
    ++t
    for(x=z='',c=0;c++&lt;6;)
      for(x+='_',z+='_',r=0;r&lt;6;r++)
        x+=b[c+r*7],z+=b[c&lt;4?c-1+r*8:c+1+r*6];
    show()
    if (/X{5}|O{5}/.test(b.join('')+x+z))
      end(1)
    else if(t==6*6) 
      end(2)
    return false
  })
}

function end(w) {
  var n=['Order','Chaos'][w-1]
  $('th').eq(0).text('P'+w+' '+n+' Wins')
  $('th').eq(1).text('Click to play again')
  
  $('table')[0].className=$('tr')[0].className =n[0];
  $('#B').off('mouseup').on('mouseup', start)
}
function show() {
  var w,p
  p=t&amp;1
  $('tr')[0].className=$('#B')[0].className='OC'[p];
  w=b.map(function(c,i){
    return c&gt;' '?'&lt;td class='+(c=='.'?'F':'X')+' id=C'+i+'&gt;'+c+'&lt;/td&gt;':'&lt;/tr&gt;&lt;tr&gt;'
  }).join('');
  $('th').eq(0).text('Playing: '+['Order','Chaos'][p]);
  $('#B').html('&lt;tr&gt;' + w +'&lt;/tr&gt;');
}

start()
th { 
  font-size: 12px;
}
.C th { color: #807; }
.O th { color: #047; }
.C td.F:hover { background: #f0e; }
.O td.F:hover { background: #0fe; }
table.C td { background: #f0e; }
table.O td { background: #0fe; }

td {
  font-family: monospace;
  font-size: 12px;
  width: 1.2em;
  height: 1em;
  text-align: center;
}
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;table&gt;
  &lt;tr&gt;&lt;th colspan=6&gt;&lt;/th&gt;&lt;/tr&gt;
  &lt;tbody id=B&gt;&lt;/tbody&gt;
  &lt;tr&gt;&lt;th colspan=6&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;p id=O&gt;&lt;/p&gt;