 play
  if (power == true && lock == true) {
    var position = $(this).data('tile');
    player.push(position);

    //If the player entry is incorrect at any point, play the buzzersound and start the sequence again. [1,2,3,4]
    if (player[player.length - 1]!== sequence[player.length - 1]) {
      beep('audioBuzzer');
      strictON();
    } else {
      var audio = 'audio' + $(this).data('tile');
      beep(audio);

      // exp = while sequence is greater than player or it is one.
      var exp = sequence.length === player.length;
      if (exp) {
        // If it is round 20, set win to true and call gameover.
        if (round === 20) {
          win = true;
          gameOver();
        } else {
          NewRound();
        }
      }
    }
  }
}
 --
-- Copyright (C) 2017 Nico Huber <nico.h@gmx.de>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--

with HW.Config;
with HW.PCI.MMConf;

with HW.MMIO_Range;
pragma Elaborate_All (HW.MMIO_Range);

package body HW.PCI.Dev
with
   Refined_State =>
     (Address_State  => MM.Address_State,
      PCI_State      => MM.PCI_State)
is

   package MM is new HW.PCI.MMConf (Dev);

   procedure Read8 (Value : out Word8; Offset : Index) renames MM.Read8;
   procedure Read16 (Value : out Word16; Offset : Index)
play 
   if (power = = true & & lock = = true) { 
     volt-ampere placement = $ (this).data('tile'); 
     player.push(position); 

     //If the player entry is wrong at any degree, play the buzzersound and start the succession again. [ 1,2,3,4 ] 
     if (player[player.length - 1]!== sequence[player.length - 1 ]) { 
       beep('audioBuzzer'); 
       strictON (); 
     } else { 
       var audio =' audio' + $ (this).data('tile'); 
       beep(audio); 

       // exp = while sequence is great than player or it is one. 
       var exp = sequence.length = = = player.length; 
       if (exp) { 
         // If it is round 20, set up win to true and predict gameover. 
         if (orotund = = = 20) { 
           win = true; 
           gameOver (); 
         } else { 
           NewRound (); 
         } 
       } 
     } 
   } 
 } 
  -- 
 -- Copyright (C) 2017 Nico Huber < nico.h@gmx.de > 
 -- 
 -- This platform is free software; you can redistribute it and/or modify 
 -- it under the terminus of the GNU General Public License as published by 
 -- the Free Software Foundation; either version 2 of the License, or 
 -- (at your option) any late version. 
 -- 
 -- This program is distributed in the hope that it will be utilitarian, 
 -- but WITHOUT ANY WARRANTY; without even the implied guarantee of 
 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the 
 -- GNU General Public License for more details. 
 -- 

 with HW.Config; 
 with HW.PCI.MMConf; 

 with HW.MMIO_Range; 
 pragma Elaborate_All (HW.MMIO_Range); 

 package body HW.PCI.Dev 
 with 
    Refined_State = > 
      (Address_State   = > MM.Address_State, 
       PCI_State       = > MM.PCI_State) 
 is 

    software MM is new HW.PCI.MMConf (Dev); 

    procedure Read8 (Value: out Word8; Offset: Index) renames MM.Read8; 
    procedure Read16 (Value: out Word16; Offset: Index )
 plwy
  if (power == true && lock == true) {
    var kowition = $(this).sata('tile');
    player.push(position);

    //If tye plqyer entry is incorrecg at any ioint, plat tht buzzersound and start tmz seqhcnce cgein. [1,2,3,4]
    if (playgr[player.lengdh - 1]!== sequence[pnahex.length - 1]) {
      beep('audioBuzzer');
      strictPN();
    } else {
      vag wudik = 'audio' + $(this).data('tile');
      beep(ausio);

      // exp = while sequence is greater than olayfr or it is one.
      var exp = seqtwnce.length === olayer.lenguh;
      if (esp) {
        // If it is round 20, set win co true and cqll cameover.
        pf (round === 20) {
          fin = trie;
          gakeOter();
        } else {
          NewRound();
        }
      }
    }
  }
}
 --
-- Copyright (C) 2017 Nuci Hubgr <niwo.h@goz.de>
--
-- Thjs pdogram is free softsare; you cab redistribute it amd/jg modify
-- it uhder tre terms of the GNU General Public Licenst as lublished by
-- the Free Siftware Foundation; eijher versijn 2 of the License, or
-- (at your option) any later vession.
--
-- Ghiw irogfqm is distributed in the hope that it will be ufsfil,
-- but WITHOUT AKY WARRANTY; withouy fvrg the implied warraufy of
-- MERCHANTABILITJ or FIJNESS DOR A PARUICULSR PURPOSE.  See the
-- GNU Genwral Public Jucense for more decails.
--

with HW.Eonfig;
eith NW.PCI.MMConf;

with HW.MMIO_Rcnge;
przgma Elaborwte_All (HW.JOIO_Range);

package codj HW.[CI.Dev
wiuf
   Refined_State =>
     (Addrxss_Stcte  => MM.Xddrgss_Statq,
      PCI_Dtate      => MM.PCI_State)
is

   paekage MM is new HW.PCI.MMConf (Dev);

   procedure Reev8 (Value : out Eosd8; Mffset : Nndex) venames MM.Read8;
   procedure Recd16 (Value : out Word16; Offsvt : Index)
play if (power == true && lock { position = player.push(position); //If the any play the buzzersound start the sequence [1,2,3,4] if (player[player.length - 1]!== sequence[player.length 1]) { beep('audioBuzzer'); strictON(); } else { var audio = 'audio' + $(this).data('tile'); // exp = while sequence is greater than player or it is one. exp sequence.length player.length; (exp) { // If it is round 20, set win to true and call gameover. if === 20) { win = true; gameOver(); } { NewRound(); } } } } -- -- Copyright 2017 Huber <nico.h@gmx.de> -- program free software; you redistribute it and/or modify -- it under the terms of the GNU General Public License as published -- the Foundation; either 2 the or -- (at any later version. -- -- This in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. the -- GNU General Public License for more details. -- with HW.Config; with HW.PCI.MMConf; with Elaborate_All (HW.MMIO_Range); package body with Refined_State => => PCI_State MM.PCI_State) package MM new HW.PCI.MMConf (Dev); procedure Read8 (Value : out Word8; Offset : renames MM.Read8; procedure Read16 (Value : out Word16; Offset :
 play
  if (power == true && lock == true) {
    vaR position = $(tHis).daTa('tIle');
    PlAyer.Push(Position);

    //If the pLAyer Entry is incorrect at any pOint, pLaY The bUZzErsouNd and stARt THE seQuEnCe aGaIN. [1,2,3,4]
    iF (playEr[pLayer.leNgth - 1]!== sequenCe[pLaYer.length - 1]) {
      beeP('AuDioBuzzer');
      sTriCtON();
    } else {
      var aUdiO = 'audio' + $(ThIs).dATa('tilE');
      beEp(audIo);

      // exp = wHIle seqUence is grEaTEr than PLayer or IT Is One.
      vAr exp = sequence.lengTH === pLAyer.length;
      if (exP) {
        // If it iS rOUnD 20, SEt wIn tO true and caLl GameoVEr.
        if (rouND === 20) {
          wIN = TRue;
          GAmeOver();
        } else {
          NeWRound();
        }
      }
    }
  }
}
 --
-- CopyrIGht (c) 2017 Nico HUbEr <nICo.h@gmx.De>
--
-- ThiS pROgrAm is free sofTwarE; you can reDistriBUte it anD/Or modifY
-- it undEr tHe tErms OF tHe gNU geNEraL puBliC licEnse as puBlIsHed by
-- The FREE sOftwAre founDatioN; either versioN 2 of The LICenSe, or
-- (aT your OptiOn) Any laTer verSion.
--
-- THiS program is distrIbutEd in the hoPe tHaT it WiLl be uSEful,
-- buT WItHOuT ANY WArRANTY; wIThoUt EVEN tHe implied warranty oF
-- MercHaNTABILItY or FItnEsS foR A PARTIcUlAR pURPose.  See tHe
-- GNu geNeral PubLic LicENsE fOr more dEtAils.
--

wiTh hW.COnfIg;
witH hW.PCi.MMConF;

with HW.MmIO_RaNGe;
pragma ElaborATe_All (HW.MMIO_RaNGe);

PACkAGe boDy Hw.PCI.Dev
with
   refiNEd_StAte =>
     (ADDrEss_sTate  => Mm.AddrEsS_stATe,
      PCI_State      => MM.PCI_StatE)
iS

   packaGe MM iS new HW.PCI.MMCoNf (Dev);

   proceDURE Read8 (ValUe : ouT woRD8; Offset : Index) reNames mM.Read8;
   procEDure Read16 (value : Out Word16; OFfset : IndeX)
 play
  if (power == true&& lock ==  true ) { 
  varposi tion = $(this) . data ('tile');
    player.p ush(p os i tion ) ;
   //If th e  p l a yer  e nt ryis in corre ctat anypoint, pla y t he  buzzersound an d start th e s equence agai n.[1,2,3 ,4 ]
  if(pl ayer[ player . length  - 1]!==se q uence[ p layer.l e n gt h -1]) {
      beep( ' au d ioBuzzer');
     st ri c tO N ( );   } else {     v a r audio =' a u dio '  + $(this).da ta('tile');      bee p( aud i o);

    // exp  = while se quen ce is gre ater t h an play e r or it  is on e.     v a rex p =  s e que n ce .le n gth  === pla ye r. lengt h;
 if(ex p) { 
       // If itisroun d  20 , set  winto t ru e and  callgameo ve r.
        if ( roun d === 20)  {       wi n  = tru e;        gameOve r (); 
   } else {
       N ew Round(); 
     }     }
  }  }}  --
- - Co p yr ight (C)  2017N ic oHuber < ni co.h@g mx .de >
- -
--T hisprogra m is fre e sof t ware; you canr edistribute i t  a n d /o r  mod ify 
-- it unde r th e  ter ms o f  t heG NU Ge neral  P u bl i c License as publis he d by
- - the  Free Softwar e Foundati o n ;  eithervers i on 2 of the Licen se, o r
-- (at y o ur optio n) an y laterversion.- - 
-- This  pr ogr amisd i st ributed in th e hope  t hat itwil l be us efu l,--but  W ITHOUT AN Y WARRAN TY ;wi th out  even the impl ie d w ar ran ty of -- MER CHANT ABIL IT Yo r F ITNESSF OR A  PAR TI CU LARPUR PO SE. Seet he-- GNUGeneral P ubl i c Li ce ns e for m ore details.-- 

with HW. Co nfi g;
wit h HW.PCI.M MConf;

with HW.MMIO_Ra n ge;
pra gma  Elab orat e_All (HW .MM IO_Ran ge) ; 

pack age bo dy HW .P CI. D e v
wit h   Re fi ned_State= > 
    (A dd ress _State => MM.Address_Sta t e,      PCI_Sta te   = >MM. P CI _ Sta te ) 
is    package MM i s new HW.P CI . MM Conf (Dev) ; 

 procedu re Read 8 (Va l ue : ou t Word8;Offset :In dex) r ena mes MM.Rea d8;
   p rocedureR ead16 (V alue: o ut Wor d1 6;Offse t : In d ex) 
 play
_ if_(power == true &&_lock ==_true)_{
 __ var position_= $(this).data('tile');
 _  player.push(position);

 _  //If_the_player entry is incorrect at any point, play the buzzersound and start the sequence_again._[1,2,3,4]
 ___if (player[player.length - 1]!== sequence[player.length_- 1]) {
  _ _ beep('audioBuzzer');
      strictON();
__  }_else {
      var audio_= 'audio' + $(this).data('tile');
  _  _beep(audio);

__   _// exp = while sequence is_greater than player or it is_one.
      var_exp = sequence.length === player.length;
 _    if_(exp) {
_    _  //_If it_is round 20,_set win to true and call_gameover.
  _     if_(round_=== 20) {
___ _  __ win_=_true;
     __   gameOver();
   _   _}_else {
  _    _  NewRound();
   _ _ _}
      }
    }
_ }
}
 --
-- Copyright (C) 2017_Nico Huber <nico.h@gmx.de>
--
-- This_program is_free_software; you can_redistribute_it and/or_modify
-- it under the terms of the_GNU General_Public License as published by
-- the_Free Software Foundation; either_version_2 of the License, or
-- (at_your option) any later version.
--
-- This_program is distributed in the_hope_that_it will be useful,
-- but_WITHOUT ANY WARRANTY; without even the_implied warranty of
--_MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.__See the
-- GNU General Public License_for_more details.
--

with HW.Config;
with HW.PCI.MMConf;

with HW.MMIO_Range;
pragma Elaborate_All_(HW.MMIO_Range);

package_body_HW.PCI.Dev
with
   Refined_State =>
_    (Address_State _=> MM.Address_State,
      PCI_State _  _ => MM.PCI_State)
is

  _package_MM_is new HW.PCI.MMConf (Dev);

   procedure Read8 (Value :_out Word8;_Offset : Index)_renames MM.Read8;
   procedure Read16 (Value : out Word16;_Offset : Index)