     console.log 'set', set, JSON.stringify set
     console.log 'questionLeft', questionLeft - 1
 
-  queryValidator: ->
-    {qx, q, range} = @state
+  handleAdvancedChange: ->
+    @setState
+      isAdvance: !@state.isAdvance
+
+  handleQuickButton: ->
+    {quickQuery} = @state
+    console.log quickQuery
+
+  queryValidator: (qx, q, range) ->
     if q.length isnt range
       console.log "query harus berjumlah #{range} (#{q.length})"
       return false

    h

  render: ->
    {set, playing, range, maxLies, qx, q, questionLeft} = @state

    dom 'section', className: 'row',
      dom 'span', className: 'five columns',

  getInitialState: ->
    set: [] # truth set and lie set
    playing: false
    questionLeft: 30
    qx: '1'
    q: '0000000011111111'
    quickQuery: ''
    isAdvance: false

    # input values
    range: 16
    maxLies: 8 # maximal number of lies

  componentWillMount: ->
    # ### only for debugging
    @handlePlayButton()
    @setState
      set: [{"q":"0","qx":"0","n":[16,0,0,0,0,0,0,0,0],"s":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"w":44864192,"wp":100,"questionLeft":30,"fk":382.93053810040755},{"q":"0000000011111111","s":[1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],"n":[8,8,0,0,0,0,0,0,0],"qx":"1","questionLeft":29,"c":{"0":[8,8,0,0,0,0,0,0,0],"1":[8,8,0,0,0,0,0,0,0]},"w":22432096,"wp":50,"fk":246.00068548512735,"wn":22432096,"wpn":50,"wy":22432096,"wpy":50},{"q":"0000111100001111","s":[2,2,2,2,1,1,1,1,1,1,1,1,0,0,0,0],"n":[4,8,4,0,0,0,0,0,0],"qx":"1","questionLeft":28,"c":{"0":[4,8,4,0,0,0,0,0,0],"1":[4,8,4,0,0,0,0,0,0]},"w":11216048,"wp":50,"fk":159.47753410431685,"wn":11216048,"wpn":50,"wy":11216048,"wpy":50},{"q":"0011001100110011","s":[3,3,2,2,2,2,1,1,2,2,1,1,1,1,0,0],"n":[2,6,6,2,0,0,0,0,0],"qx":"1","questionLeft":27,"c":{"0":[2,6,6,2,0,0,0,0,0],"1":[2,6,6,2,0,0,0,0,0]},"w":5608024,"wp":50,"fk":104.39889734479132,"wn":5608024,"wpn":50,"wy":5608024,"wpy":50},{"q":"0101010101010101","s":[4,3,3,2,3,2,2,1,3,2,2,1,2,1,1,0],"n":[1,4,6,4,1,0,0,0,0],"qx":"1","questionLeft":26,"c":{"0":[1,4,6,4,1,0,0,0,0],"1":[1,4,6,4,1,0,0,0,0]},"w":2804012,"wp":50,"fk":69.06250411644602,"wn":2804012,"wpn":50,"wy":2804012,"wpy":50}]
      questionLeft: 26
    # ###

  handleInputNumberChange: (event) ->
    value = parseInt(event.target.value)
