diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.vscode/settings.json b/.vscode/settings.json old mode 100644 new mode 100755 diff --git a/MTG/down.jpeg b/MTG/down.jpeg old mode 100644 new mode 100755 diff --git a/MTG/icons/android-chrome-192x192.png b/MTG/icons/android-chrome-192x192.png old mode 100644 new mode 100755 diff --git a/MTG/icons/android-chrome-512x512.png b/MTG/icons/android-chrome-512x512.png old mode 100644 new mode 100755 diff --git a/MTG/icons/apple-touch-icon.png b/MTG/icons/apple-touch-icon.png old mode 100644 new mode 100755 diff --git a/MTG/icons/browserconfig.xml b/MTG/icons/browserconfig.xml old mode 100644 new mode 100755 diff --git a/MTG/icons/favicon-16x16.png b/MTG/icons/favicon-16x16.png old mode 100644 new mode 100755 diff --git a/MTG/icons/favicon-32x32.png b/MTG/icons/favicon-32x32.png old mode 100644 new mode 100755 diff --git a/MTG/icons/favicon.ico b/MTG/icons/favicon.ico old mode 100644 new mode 100755 diff --git a/MTG/icons/mstile-150x150.png b/MTG/icons/mstile-150x150.png old mode 100644 new mode 100755 diff --git a/MTG/icons/safari-pinned-tab.svg b/MTG/icons/safari-pinned-tab.svg old mode 100644 new mode 100755 diff --git a/MTG/img/dice.png b/MTG/img/dice.png old mode 100644 new mode 100755 diff --git a/MTG/img/dice.webp b/MTG/img/dice.webp old mode 100644 new mode 100755 diff --git a/MTG/index.html b/MTG/index.html old mode 100644 new mode 100755 index cbbe938..e50ecb1 --- a/MTG/index.html +++ b/MTG/index.html @@ -288,6 +288,6 @@ - + diff --git a/MTG/manifest.json.bak b/MTG/manifest.json.bak old mode 100644 new mode 100755 diff --git a/MTG/menu/menu.html b/MTG/menu/menu.html old mode 100644 new mode 100755 diff --git a/MTG/script.js b/MTG/script.js old mode 100644 new mode 100755 diff --git a/MTG/site.webmanifest b/MTG/site.webmanifest old mode 100644 new mode 100755 diff --git a/MTG/style.css b/MTG/style.css old mode 100644 new mode 100755 diff --git a/MTG/sw.js b/MTG/sw.js old mode 100644 new mode 100755 diff --git a/MTG/up.jpeg b/MTG/up.jpeg old mode 100644 new mode 100755 diff --git a/alyssa/alyssa.jpg b/alyssa/alyssa.jpg old mode 100644 new mode 100755 diff --git a/alyssa/index.html b/alyssa/index.html old mode 100644 new mode 100755 diff --git a/alyssa/mail.svg b/alyssa/mail.svg old mode 100644 new mode 100755 diff --git a/alyssa/map.svg b/alyssa/map.svg old mode 100644 new mode 100755 diff --git a/alyssa/phone.svg b/alyssa/phone.svg old mode 100644 new mode 100755 diff --git a/alyssa/puzzle/index.html b/alyssa/puzzle/index.html old mode 100644 new mode 100755 diff --git a/alyssa/puzzle/script.js b/alyssa/puzzle/script.js old mode 100644 new mode 100755 diff --git a/alyssa/puzzle/style.css b/alyssa/puzzle/style.css old mode 100644 new mode 100755 diff --git a/animal/index.html b/animal/index.html old mode 100644 new mode 100755 diff --git a/animal/script.js b/animal/script.js old mode 100644 new mode 100755 diff --git a/animal/style.css b/animal/style.css old mode 100644 new mode 100755 diff --git a/be_mine/be_mine.css b/be_mine/be_mine.css old mode 100644 new mode 100755 diff --git a/be_mine/be_mine.js b/be_mine/be_mine.js old mode 100644 new mode 100755 diff --git a/be_mine/index.html b/be_mine/index.html old mode 100644 new mode 100755 diff --git a/be_mine/vday/bed.jpg b/be_mine/vday/bed.jpg old mode 100644 new mode 100755 diff --git a/be_mine/vday/bemine.jpg b/be_mine/vday/bemine.jpg old mode 100644 new mode 100755 diff --git a/be_mine/vday/chem.jpg b/be_mine/vday/chem.jpg old mode 100644 new mode 100755 diff --git a/be_mine/vday/darwin.jpg b/be_mine/vday/darwin.jpg old mode 100644 new mode 100755 diff --git a/be_mine/vday/doc.jpg b/be_mine/vday/doc.jpg old mode 100644 new mode 100755 diff --git a/be_mine/vday/flowers.jpg b/be_mine/vday/flowers.jpg old mode 100644 new mode 100755 diff --git a/be_mine/vday/flowers.png b/be_mine/vday/flowers.png old mode 100644 new mode 100755 diff --git a/be_mine/vday/no/dontlike.gif b/be_mine/vday/no/dontlike.gif old mode 100644 new mode 100755 diff --git a/be_mine/vday/no/jimtryagain.gif b/be_mine/vday/no/jimtryagain.gif old mode 100644 new mode 100755 diff --git a/be_mine/vday/no/pleaseyes.gif b/be_mine/vday/no/pleaseyes.gif old mode 100644 new mode 100755 diff --git a/be_mine/vday/no/sure.gif b/be_mine/vday/no/sure.gif old mode 100644 new mode 100755 diff --git a/be_mine/vday/no/tryagain.gif b/be_mine/vday/no/tryagain.gif old mode 100644 new mode 100755 diff --git a/be_mine/vday/no/wrong.gif b/be_mine/vday/no/wrong.gif old mode 100644 new mode 100755 diff --git a/be_mine/vday/periodic.jpg b/be_mine/vday/periodic.jpg old mode 100644 new mode 100755 diff --git a/be_mine/vday/proton.jpg b/be_mine/vday/proton.jpg old mode 100644 new mode 100755 diff --git a/be_mine/vday/robot.jpg b/be_mine/vday/robot.jpg old mode 100644 new mode 100755 diff --git a/be_mine/vday/slither.jpg b/be_mine/vday/slither.jpg old mode 100644 new mode 100755 diff --git a/be_mine/vday/snape.jpg b/be_mine/vday/snape.jpg old mode 100644 new mode 100755 diff --git a/billhenry/.~lock.WilliamBHenryResume.docx# b/billhenry/.~lock.WilliamBHenryResume.docx# old mode 100644 new mode 100755 diff --git a/billhenry/WilliamBHenryResume.docx b/billhenry/WilliamBHenryResume.docx old mode 100644 new mode 100755 diff --git a/billhenry/WilliamBHenryResume.html b/billhenry/WilliamBHenryResume.html old mode 100644 new mode 100755 diff --git a/billhenry/WilliamBHenryResume.odt b/billhenry/WilliamBHenryResume.odt old mode 100644 new mode 100755 diff --git a/billhenry/WilliamBHenryResume.pdf b/billhenry/WilliamBHenryResume.pdf old mode 100644 new mode 100755 diff --git a/billhenry/WilliamBHenryResume.xml b/billhenry/WilliamBHenryResume.xml old mode 100644 new mode 100755 diff --git a/billhenry/bill.jpeg b/billhenry/bill.jpeg old mode 100644 new mode 100755 diff --git a/billhenry/index.html b/billhenry/index.html old mode 100644 new mode 100755 diff --git a/billhenry/mail.svg b/billhenry/mail.svg old mode 100644 new mode 100755 diff --git a/billhenry/map.svg b/billhenry/map.svg old mode 100644 new mode 100755 diff --git a/billhenry/phone.svg b/billhenry/phone.svg old mode 100644 new mode 100755 diff --git a/binary/binary.css b/binary/binary.css old mode 100644 new mode 100755 diff --git a/binary/binary.ico b/binary/binary.ico old mode 100644 new mode 100755 diff --git a/binary/binary.js b/binary/binary.js old mode 100644 new mode 100755 diff --git a/binary/index.html b/binary/index.html old mode 100644 new mode 100755 diff --git a/binary/table.html b/binary/table.html old mode 100644 new mode 100755 diff --git a/bingo/bingo.ico b/bingo/bingo.ico old mode 100644 new mode 100755 diff --git a/bingo/bingo.png b/bingo/bingo.png old mode 100644 new mode 100755 diff --git a/bingo/bingo1.html b/bingo/bingo1.html old mode 100644 new mode 100755 diff --git a/bingo/bingomobile.html b/bingo/bingomobile.html old mode 100644 new mode 100755 diff --git a/bingo/index.html b/bingo/index.html old mode 100644 new mode 100755 diff --git a/cetech.png b/cetech.png old mode 100644 new mode 100755 diff --git a/cetechwhite.png b/cetechwhite.png old mode 100644 new mode 100755 diff --git a/count/index.html b/count/index.html old mode 100644 new mode 100755 diff --git a/count/script.js b/count/script.js old mode 100644 new mode 100755 diff --git a/count/style.css b/count/style.css old mode 100644 new mode 100755 diff --git a/dental/banner.jpg b/dental/banner.jpg old mode 100644 new mode 100755 diff --git a/dental/chair.jpeg b/dental/chair.jpeg old mode 100644 new mode 100755 diff --git a/dental/dentist.jpeg b/dental/dentist.jpeg old mode 100644 new mode 100755 diff --git a/dental/docs/docs/medical-history.pdf b/dental/docs/docs/medical-history.pdf old mode 100644 new mode 100755 diff --git a/dental/docs/docs/privacy-policy (1).pdf b/dental/docs/docs/privacy-policy (1).pdf old mode 100644 new mode 100755 diff --git a/dental/docs/medical-history.pdf b/dental/docs/medical-history.pdf old mode 100644 new mode 100755 diff --git a/dental/docs/privacy-policy (1).pdf b/dental/docs/privacy-policy (1).pdf old mode 100644 new mode 100755 diff --git a/dental/doctor.html b/dental/doctor.html old mode 100644 new mode 100755 diff --git a/dental/family.jpeg b/dental/family.jpeg old mode 100644 new mode 100755 diff --git a/dental/index.html b/dental/index.html old mode 100644 new mode 100755 diff --git a/dental/index1.html b/dental/index1.html old mode 100644 new mode 100755 diff --git a/dental/index2.html b/dental/index2.html old mode 100644 new mode 100755 diff --git a/dental/milford/IMG_3501.JPG b/dental/milford/IMG_3501.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/IMG_3502.JPG b/dental/milford/IMG_3502.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/IMG_3503.JPG b/dental/milford/IMG_3503.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/IMG_3505.JPG b/dental/milford/IMG_3505.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/IMG_3507.JPG b/dental/milford/IMG_3507.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/IMG_3515.JPG b/dental/milford/IMG_3515.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/IMG_3516.JPG b/dental/milford/IMG_3516.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/IMG_3521.JPG b/dental/milford/IMG_3521.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/IMG_3524.JPG b/dental/milford/IMG_3524.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/main.JPG b/dental/milford/main.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/main1.JPG b/dental/milford/main1.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/IMG_3501.JPG b/dental/milford/milford/IMG_3501.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/IMG_3502.JPG b/dental/milford/milford/IMG_3502.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/IMG_3503.JPG b/dental/milford/milford/IMG_3503.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/IMG_3505.JPG b/dental/milford/milford/IMG_3505.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/IMG_3507.JPG b/dental/milford/milford/IMG_3507.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/IMG_3515.JPG b/dental/milford/milford/IMG_3515.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/IMG_3516.JPG b/dental/milford/milford/IMG_3516.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/IMG_3521.JPG b/dental/milford/milford/IMG_3521.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/IMG_3524.JPG b/dental/milford/milford/IMG_3524.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/main.JPG b/dental/milford/milford/main.JPG old mode 100644 new mode 100755 diff --git a/dental/milford/milford/main1.JPG b/dental/milford/milford/main1.JPG old mode 100644 new mode 100755 diff --git a/dental/paste.jpeg b/dental/paste.jpeg old mode 100644 new mode 100755 diff --git a/dental/services.html b/dental/services.html old mode 100644 new mode 100755 diff --git a/dental/smile_swing.jpeg b/dental/smile_swing.jpeg old mode 100644 new mode 100755 diff --git a/dental/team.html b/dental/team.html old mode 100644 new mode 100755 diff --git a/dental/teeth.jpg b/dental/teeth.jpg old mode 100644 new mode 100755 diff --git a/dental/test.html b/dental/test.html old mode 100644 new mode 100755 diff --git a/dental/tooth.ico b/dental/tooth.ico old mode 100644 new mode 100755 diff --git a/dental/visit.html b/dental/visit.html old mode 100644 new mode 100755 diff --git a/dice/die1.gif b/dice/die1.gif old mode 100644 new mode 100755 diff --git a/dice/die1.png b/dice/die1.png old mode 100644 new mode 100755 diff --git a/dice/die2.gif b/dice/die2.gif old mode 100644 new mode 100755 diff --git a/dice/die2.png b/dice/die2.png old mode 100644 new mode 100755 diff --git a/dice/die3.gif b/dice/die3.gif old mode 100644 new mode 100755 diff --git a/dice/die3.png b/dice/die3.png old mode 100644 new mode 100755 diff --git a/dice/die4.gif b/dice/die4.gif old mode 100644 new mode 100755 diff --git a/dice/die4.png b/dice/die4.png old mode 100644 new mode 100755 diff --git a/dice/die5.gif b/dice/die5.gif old mode 100644 new mode 100755 diff --git a/dice/die5.png b/dice/die5.png old mode 100644 new mode 100755 diff --git a/dice/die6.gif b/dice/die6.gif old mode 100644 new mode 100755 diff --git a/dice/die6.png b/dice/die6.png old mode 100644 new mode 100755 diff --git a/favicon.ico b/favicon.ico old mode 100644 new mode 100755 diff --git a/how.png b/how.png old mode 100644 new mode 100755 diff --git a/index.html b/index.html old mode 100644 new mode 100755 diff --git a/index_old.html b/index_old.html old mode 100644 new mode 100755 diff --git a/index_oldv2.html b/index_oldv2.html old mode 100644 new mode 100755 diff --git a/kathleen.html b/kathleen.html old mode 100644 new mode 100755 diff --git a/logo.png b/logo.png old mode 100644 new mode 100755 diff --git a/mario/index.html b/mario/index.html old mode 100644 new mode 100755 diff --git a/memory/index.html b/memory/index.html old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001456-02.jpeg b/memory/mem_pics/kawaii/IMG_20150723_001456-02.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001508-01.jpeg b/memory/mem_pics/kawaii/IMG_20150723_001508-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001523-01 (2).jpeg b/memory/mem_pics/kawaii/IMG_20150723_001523-01 (2).jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001523-01.jpeg b/memory/mem_pics/kawaii/IMG_20150723_001523-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001531-01.jpeg b/memory/mem_pics/kawaii/IMG_20150723_001531-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001623-01 (2).jpeg b/memory/mem_pics/kawaii/IMG_20150723_001623-01 (2).jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001623-01.jpeg b/memory/mem_pics/kawaii/IMG_20150723_001623-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001633-01.jpeg b/memory/mem_pics/kawaii/IMG_20150723_001633-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001640-01.jpeg b/memory/mem_pics/kawaii/IMG_20150723_001640-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001703-01 (2).jpeg b/memory/mem_pics/kawaii/IMG_20150723_001703-01 (2).jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001703-01.jpeg b/memory/mem_pics/kawaii/IMG_20150723_001703-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/IMG_20150723_001712-01.jpeg b/memory/mem_pics/kawaii/IMG_20150723_001712-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/mem_img0.jpeg b/memory/mem_pics/kawaii/mem_img0.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/mem_img1.jpeg b/memory/mem_pics/kawaii/mem_img1.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/mem_img2.jpeg b/memory/mem_pics/kawaii/mem_img2.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/mem_img3.jpeg b/memory/mem_pics/kawaii/mem_img3.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/mem_img4.jpeg b/memory/mem_pics/kawaii/mem_img4.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/mem_img5.jpeg b/memory/mem_pics/kawaii/mem_img5.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/mem_img6.jpeg b/memory/mem_pics/kawaii/mem_img6.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/mem_img7.jpeg b/memory/mem_pics/kawaii/mem_img7.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/mem_img8.jpeg b/memory/mem_pics/kawaii/mem_img8.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/kawaii/mem_img9.jpeg b/memory/mem_pics/kawaii/mem_img9.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/IMG_20150708_002614-01.jpeg b/memory/mem_pics/mer/IMG_20150708_002614-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/IMG_20150708_002628-01.jpeg b/memory/mem_pics/mer/IMG_20150708_002628-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/IMG_20150708_002645-01.jpeg b/memory/mem_pics/mer/IMG_20150708_002645-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/IMG_20150708_002700-01.jpeg b/memory/mem_pics/mer/IMG_20150708_002700-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/IMG_20150708_002713-01.jpeg b/memory/mem_pics/mer/IMG_20150708_002713-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/IMG_20150708_002736-01.jpeg b/memory/mem_pics/mer/IMG_20150708_002736-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/IMG_20150708_002751-01.jpeg b/memory/mem_pics/mer/IMG_20150708_002751-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/IMG_20150708_002802-01.jpeg b/memory/mem_pics/mer/IMG_20150708_002802-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/IMG_20150708_002812-01.jpeg b/memory/mem_pics/mer/IMG_20150708_002812-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/IMG_20150708_002823-01.jpeg b/memory/mem_pics/mer/IMG_20150708_002823-01.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/mem_img0.jpeg b/memory/mem_pics/mer/mem_img0.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/mem_img1.jpeg b/memory/mem_pics/mer/mem_img1.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/mem_img2.jpeg b/memory/mem_pics/mer/mem_img2.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/mem_img3.jpeg b/memory/mem_pics/mer/mem_img3.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/mem_img4.jpeg b/memory/mem_pics/mer/mem_img4.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/mem_img5.jpeg b/memory/mem_pics/mer/mem_img5.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/mem_img6.jpeg b/memory/mem_pics/mer/mem_img6.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/mem_img7.jpeg b/memory/mem_pics/mer/mem_img7.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/mem_img8.jpeg b/memory/mem_pics/mer/mem_img8.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/mer/mem_img9.jpeg b/memory/mem_pics/mer/mem_img9.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/super/mem_img0.jpeg b/memory/mem_pics/super/mem_img0.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/super/mem_img1.jpeg b/memory/mem_pics/super/mem_img1.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/super/mem_img2.jpeg b/memory/mem_pics/super/mem_img2.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/super/mem_img3.jpeg b/memory/mem_pics/super/mem_img3.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/super/mem_img4.jpeg b/memory/mem_pics/super/mem_img4.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/super/mem_img5.jpeg b/memory/mem_pics/super/mem_img5.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/super/mem_img6.jpeg b/memory/mem_pics/super/mem_img6.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/super/mem_img7.jpeg b/memory/mem_pics/super/mem_img7.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/super/mem_img8.jpeg b/memory/mem_pics/super/mem_img8.jpeg old mode 100644 new mode 100755 diff --git a/memory/mem_pics/super/mem_img9.jpeg b/memory/mem_pics/super/mem_img9.jpeg old mode 100644 new mode 100755 diff --git a/memory/memory.png b/memory/memory.png old mode 100644 new mode 100755 diff --git a/memory/memoryold.html b/memory/memoryold.html old mode 100644 new mode 100755 diff --git a/menu/3bar.png b/menu/3bar.png old mode 100644 new mode 100755 diff --git a/menu/menu.css b/menu/menu.css old mode 100644 new mode 100755 diff --git a/menu/menu.js b/menu/menu.js old mode 100644 new mode 100755 diff --git a/menu/menu.js.bak b/menu/menu.js.bak old mode 100644 new mode 100755 diff --git a/menu/test.html b/menu/test.html old mode 100644 new mode 100755 diff --git a/menu/x.png b/menu/x.png old mode 100644 new mode 100755 diff --git a/nato/index.html b/nato/index.html old mode 100644 new mode 100755 diff --git a/nato/index.js b/nato/index.js old mode 100644 new mode 100755 diff --git a/nato/style.css b/nato/style.css old mode 100644 new mode 100755 diff --git a/painted/assets/images/airbrushtattooing.jpg b/painted/assets/images/airbrushtattooing.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/balloontwisterct.jpg b/painted/assets/images/balloontwisterct.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/bg3.jpg b/painted/assets/images/bg3.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/boysfacepaintingl.jpg b/painted/assets/images/boysfacepaintingl.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/caricature.jpg b/painted/assets/images/caricature.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/facepainting.jpg b/painted/assets/images/facepainting.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/indexpic.jpg b/painted/assets/images/indexpic.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/logo copy.png b/painted/assets/images/logo copy.png old mode 100644 new mode 100755 diff --git a/painted/assets/images/logo.png b/painted/assets/images/logo.png old mode 100644 new mode 100755 diff --git a/painted/assets/images/logo1.png b/painted/assets/images/logo1.png old mode 100644 new mode 100755 diff --git a/painted/assets/images/neonarchindex.jpg b/painted/assets/images/neonarchindex.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/slide/faceartboyssm.jpg b/painted/assets/images/slide/faceartboyssm.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/slide/melfacepainting.jpg b/painted/assets/images/slide/melfacepainting.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/slide/page-1_img13_original.jpg b/painted/assets/images/slide/page-1_img13_original.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/slide/page-4_img02.jpg b/painted/assets/images/slide/page-4_img02.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/slide/tigerfacelg.jpg b/painted/assets/images/slide/tigerfacelg.jpg old mode 100644 new mode 100755 diff --git a/painted/assets/images/stiltwalker.jpg b/painted/assets/images/stiltwalker.jpg old mode 100644 new mode 100755 diff --git a/painted/balloontwisting/index.html b/painted/balloontwisting/index.html old mode 100644 new mode 100755 diff --git a/painted/contact/contact.js b/painted/contact/contact.js old mode 100644 new mode 100755 diff --git a/painted/contact/index.html b/painted/contact/index.html old mode 100644 new mode 100755 diff --git a/painted/facepainting/index.html b/painted/facepainting/index.html old mode 100644 new mode 100755 diff --git a/painted/index.html b/painted/index.html old mode 100644 new mode 100755 diff --git a/painted/style.css b/painted/style.css old mode 100644 new mode 100755 diff --git a/painted/year.js b/painted/year.js old mode 100644 new mode 100755 diff --git a/pdf/index.html b/pdf/index.html old mode 100644 new mode 100755 diff --git a/pdf/sean.html b/pdf/sean.html old mode 100644 new mode 100755 diff --git a/pdf/sean.pdf b/pdf/sean.pdf old mode 100644 new mode 100755 diff --git a/pdf/sean.png b/pdf/sean.png old mode 100644 new mode 100755 diff --git a/raya/index.html b/raya/index.html old mode 100644 new mode 100755 diff --git a/resume/chris-ascii-art.png b/resume/chris-ascii-art.png old mode 100644 new mode 100755 diff --git a/resume/chris.jpg b/resume/chris.jpg old mode 100644 new mode 100755 diff --git a/resume/index.html b/resume/index.html old mode 100644 new mode 100755 diff --git a/resume/mail.svg b/resume/mail.svg old mode 100644 new mode 100755 diff --git a/resume/map.svg b/resume/map.svg old mode 100644 new mode 100755 diff --git a/resume/phone.svg b/resume/phone.svg old mode 100644 new mode 100755 diff --git a/resume/style.css b/resume/style.css old mode 100644 new mode 100755 diff --git a/rollDice/dice.css b/rollDice/dice.css old mode 100644 new mode 100755 diff --git a/rollDice/dice.js b/rollDice/dice.js old mode 100644 new mode 100755 diff --git a/rollDice/index.html b/rollDice/index.html old mode 100644 new mode 100755 diff --git a/scott/3bars.png b/scott/3bars.png old mode 100644 new mode 100755 diff --git a/scott/Connecticut_counties_map.png b/scott/Connecticut_counties_map.png old mode 100644 new mode 100755 diff --git a/scott/about.html b/scott/about.html old mode 100644 new mode 100755 diff --git a/scott/android-chrome-192x192.png b/scott/android-chrome-192x192.png old mode 100644 new mode 100755 diff --git a/scott/android-chrome-512x512.png b/scott/android-chrome-512x512.png old mode 100644 new mode 100755 diff --git a/scott/apple-touch-icon.png b/scott/apple-touch-icon.png old mode 100644 new mode 100755 diff --git a/scott/browserconfig.xml b/scott/browserconfig.xml old mode 100644 new mode 100755 diff --git a/scott/contact.html b/scott/contact.html old mode 100644 new mode 100755 diff --git a/scott/email.html b/scott/email.html old mode 100644 new mode 100755 diff --git a/scott/email.php b/scott/email.php old mode 100644 new mode 100755 diff --git a/scott/faq.html b/scott/faq.html old mode 100644 new mode 100755 diff --git a/scott/favicon-16x16.png b/scott/favicon-16x16.png old mode 100644 new mode 100755 diff --git a/scott/favicon-32x32.png b/scott/favicon-32x32.png old mode 100644 new mode 100755 diff --git a/scott/favicon.ico b/scott/favicon.ico old mode 100644 new mode 100755 diff --git a/scott/house.jpg b/scott/house.jpg old mode 100644 new mode 100755 diff --git a/scott/house1.jpg b/scott/house1.jpg old mode 100644 new mode 100755 diff --git a/scott/index.html b/scott/index.html old mode 100644 new mode 100755 diff --git a/scott/index_nav.html b/scott/index_nav.html old mode 100644 new mode 100755 diff --git a/scott/info.txt b/scott/info.txt old mode 100644 new mode 100755 diff --git a/scott/inspect/about.html b/scott/inspect/about.html old mode 100644 new mode 100755 diff --git a/scott/inspect/contact.html b/scott/inspect/contact.html old mode 100644 new mode 100755 diff --git a/scott/inspect/email.php b/scott/inspect/email.php old mode 100644 new mode 100755 diff --git a/scott/inspect/faq.html b/scott/inspect/faq.html old mode 100644 new mode 100755 diff --git a/scott/inspect/favicon.ico b/scott/inspect/favicon.ico old mode 100644 new mode 100755 diff --git a/scott/inspect/index.html b/scott/inspect/index.html old mode 100644 new mode 100755 diff --git a/scott/inspect/inspect_logo.jpg b/scott/inspect/inspect_logo.jpg old mode 100644 new mode 100755 diff --git a/scott/inspect/inspect_logo.jpg.bak b/scott/inspect/inspect_logo.jpg.bak old mode 100644 new mode 100755 diff --git a/scott/inspect/inspect_logo.png b/scott/inspect/inspect_logo.png old mode 100644 new mode 100755 diff --git a/scott/inspect/inspection.html b/scott/inspect/inspection.html old mode 100644 new mode 100755 diff --git a/scott/inspect/main.css b/scott/inspect/main.css old mode 100644 new mode 100755 diff --git a/scott/inspect/services.html b/scott/inspect/services.html old mode 100644 new mode 100755 diff --git a/scott/inspect_logo.png b/scott/inspect_logo.png old mode 100644 new mode 100755 diff --git a/scott/legend.jpeg b/scott/legend.jpeg old mode 100644 new mode 100755 diff --git a/scott/main.css b/scott/main.css old mode 100644 new mode 100755 diff --git a/scott/main_nav.css b/scott/main_nav.css old mode 100644 new mode 100755 diff --git a/scott/map.png b/scott/map.png old mode 100644 new mode 100755 diff --git a/scott/mstile-144x144.png b/scott/mstile-144x144.png old mode 100644 new mode 100755 diff --git a/scott/mstile-150x150.png b/scott/mstile-150x150.png old mode 100644 new mode 100755 diff --git a/scott/mstile-70x70.png b/scott/mstile-70x70.png old mode 100644 new mode 100755 diff --git a/scott/northeast_logo.jpg b/scott/northeast_logo.jpg old mode 100644 new mode 100755 diff --git a/scott/northeast_logo.jpg.old b/scott/northeast_logo.jpg.old old mode 100644 new mode 100755 diff --git a/scott/radon.html b/scott/radon.html old mode 100644 new mode 100755 diff --git a/scott/radon_map.jpeg b/scott/radon_map.jpeg old mode 100644 new mode 100755 diff --git a/scott/radon_map.jpeg.bak b/scott/radon_map.jpeg.bak old mode 100644 new mode 100755 diff --git a/scott/services.html b/scott/services.html old mode 100644 new mode 100755 diff --git a/scott/site.webmanifest b/scott/site.webmanifest old mode 100644 new mode 100755 diff --git a/script.js b/script.js old mode 100644 new mode 100755 diff --git a/speak/index.html b/speak/index.html old mode 100644 new mode 100755 diff --git a/speak/script.js b/speak/script.js old mode 100644 new mode 100755 diff --git a/speak/style.css b/speak/style.css old mode 100644 new mode 100755 diff --git a/speak1/index.html b/speak1/index.html old mode 100644 new mode 100755 diff --git a/speak1/script.js b/speak1/script.js old mode 100644 new mode 100755 diff --git a/style.css b/style.css old mode 100644 new mode 100755 diff --git a/subwaytemps.html b/subwaytemps.html old mode 100644 new mode 100755 diff --git a/tictac/index.html b/tictac/index.html old mode 100644 new mode 100755 diff --git a/tictac/tictac.css b/tictac/tictac.css old mode 100644 new mode 100755 diff --git a/tictac/tictac.html.bak b/tictac/tictac.html.bak old mode 100644 new mode 100755 diff --git a/tictac/tictac.ico b/tictac/tictac.ico old mode 100644 new mode 100755 diff --git a/tictac/tictac.js b/tictac/tictac.js old mode 100644 new mode 100755 index e4b842e..d505e1d --- a/tictac/tictac.js +++ b/tictac/tictac.js @@ -1,633 +1,1621 @@ -var board = [] -var i = Number(i) -var j, a, error,xmove, omove, xwin, owin, draw, start; -var xwin=0, owin=0, draw=0, bcount, endgame = false; +var board = []; +var i = Number(i); +var j, a, error, xmove, omove, xwin, owin, draw, start; +var xwin = 0, + owin = 0, + draw = 0, + bcount, + endgame = false; +for (i = 1; i < 10; i++) board[i] = i; +rows = 4; +columns = 3; +function drawboard(ary) { + // Empty previous board + document.getElementById("tic").innerHTML = ""; - for (i=1; i<10; i++) board[i] = i -rows = 4 -columns = 3 -function drawboard(ary){ -document.getElementById("tic").innerHTML = "" -str = "" -str += '' + // Create an empty string -for(p = 1, q=1; p < rows; p++){ - - str += '' - for (j = 0; j < columns; q++,j++){ - str += ''; - - } - str += '' - + var str = ""; + + // Add the start of the table to the string + + str += '
' +ary[q]+'
'; + + // Iterate through each row + + for (var p = 1, q = 1; p < rows; p++) { + // Add the start of a new row to the string + + str += ""; + + // Iterate through each cell in the row + + for (var j = 0; j < columns; q++, j++) { + // Add the cell to the string with its ID and content + + str += + '"; + } + + // Add the end of the row to the string + + str += ""; + } + + // Add the end of the table to the string + + str += "
' + + ary[q] + + "
"; + + // Update the board's HTML with the new table + + document.getElementById("tic").innerHTML = str; } +function score() { + // Reset score element -str += '' -document.getElementById("tic").innerHTML =str + document.getElementById("score").innerHTML = ""; -} -function score(){ -document.getElementById("score").innerHTML="" -var score = "
X Wins = " + xwin + "
O Wins = " + owin + "
Draws =  " + draw -document.getElementById("score").innerHTML=score + // Generate score string + + var score = + "
X Wins = " + + xwin + + "
O Wins = " + + owin + + "
Draws =  " + + draw; + + // Display score in score element + + document.getElementById("score").innerHTML = score; } drawboard(board); score(); - - -var turn = "X" +var turn = "X"; var cellfunc = [ -function cell0(){}, -function cell1(){ if (board[1] == 1 && endgame == false){ board[1] = turn; document.getElementById("cell1").innerHTML = turn; document.getElementById("cell1").style.color = "#00007A"; changeTurn(); checkO(); checkX(); draw1(); }}, -function cell2(){ if (board[2] == 2 && endgame == false){ board[2] = turn; document.getElementById("cell2").innerHTML = turn; document.getElementById("cell2").style.color = "#00007A"; changeTurn(); checkO(); checkX(); draw1(); }}, -function cell3(){ if (board[3] == 3 && endgame == false){ board[3] = turn; document.getElementById("cell3").innerHTML = turn; document.getElementById("cell3").style.color = "#00007A"; changeTurn(); checkO(); checkX(); draw1(); }}, -function cell4(){ if (board[4] == 4 && endgame == false){ board[4] = turn; document.getElementById("cell4").innerHTML = turn; document.getElementById("cell4").style.color = "#00007A"; changeTurn(); checkO(); checkX(); draw1(); }}, -function cell5(){ if (board[5] == 5 && endgame == false){ board[5] = turn; document.getElementById("cell5").innerHTML = turn; document.getElementById("cell5").style.color = "#00007A"; changeTurn(); checkO(); checkX(); draw1(); }}, -function cell6(){ if (board[6] == 6 && endgame == false){ board[6] = turn; document.getElementById("cell6").innerHTML = turn; document.getElementById("cell6").style.color = "#00007A"; changeTurn(); checkO(); checkX(); draw1(); }}, -function cell7(){ if (board[7] == 7 && endgame == false){ board[7] = turn; document.getElementById("cell7").innerHTML = turn; document.getElementById("cell7").style.color = "#00007A"; changeTurn(); checkO(); checkX(); draw1(); }}, -function cell8(){ if (board[8] == 8 && endgame == false){ board[8] = turn; document.getElementById("cell8").innerHTML = turn; document.getElementById("cell8").style.color = "#00007A"; changeTurn(); checkO(); checkX(); draw1(); }}, -function cell9(){ if (board[9] == 9 && endgame == false){ board[9] = turn; document.getElementById("cell9").innerHTML = turn; document.getElementById("cell9").style.color = "#00007A"; changeTurn(); checkO(); checkX(); draw1(); }} + function cell0() {}, + function cell1() { + if (board[1] == 1 && endgame == false) { + board[1] = turn; + document.getElementById("cell1").innerHTML = turn; + document.getElementById("cell1").style.color = "#00007A"; + changeTurn(); + checkO(); + checkX(); + draw1(); + } + }, + function cell2() { + if (board[2] == 2 && endgame == false) { + board[2] = turn; + document.getElementById("cell2").innerHTML = turn; + document.getElementById("cell2").style.color = "#00007A"; + changeTurn(); + checkO(); + checkX(); + draw1(); + } + }, + function cell3() { + if (board[3] == 3 && endgame == false) { + board[3] = turn; + document.getElementById("cell3").innerHTML = turn; + document.getElementById("cell3").style.color = "#00007A"; + changeTurn(); + checkO(); + checkX(); + draw1(); + } + }, + function cell4() { + if (board[4] == 4 && endgame == false) { + board[4] = turn; + document.getElementById("cell4").innerHTML = turn; + document.getElementById("cell4").style.color = "#00007A"; + changeTurn(); + checkO(); + checkX(); + draw1(); + } + }, + function cell5() { + if (board[5] == 5 && endgame == false) { + board[5] = turn; + document.getElementById("cell5").innerHTML = turn; + document.getElementById("cell5").style.color = "#00007A"; + changeTurn(); + checkO(); + checkX(); + draw1(); + } + }, + function cell6() { + if (board[6] == 6 && endgame == false) { + board[6] = turn; + document.getElementById("cell6").innerHTML = turn; + document.getElementById("cell6").style.color = "#00007A"; + changeTurn(); + checkO(); + checkX(); + draw1(); + } + }, + function cell7() { + if (board[7] == 7 && endgame == false) { + board[7] = turn; + document.getElementById("cell7").innerHTML = turn; + document.getElementById("cell7").style.color = "#00007A"; + changeTurn(); + checkO(); + checkX(); + draw1(); + } + }, + function cell8() { + if (board[8] == 8 && endgame == false) { + board[8] = turn; + document.getElementById("cell8").innerHTML = turn; + document.getElementById("cell8").style.color = "#00007A"; + changeTurn(); + checkO(); + checkX(); + draw1(); + } + }, + function cell9() { + if (board[9] == 9 && endgame == false) { + board[9] = turn; + document.getElementById("cell9").innerHTML = turn; + document.getElementById("cell9").style.color = "#00007A"; + changeTurn(); + checkO(); + checkX(); + draw1(); + } + }, ]; -function changeTurn(){ - if(turn == 'X'){ - // document.getElementsByTagName("td").style.color = "#19FF19"; +function changeTurn() { + if (turn == "X") { + // document.getElementsByTagName("td").style.color = "#19FF19"; - turn = 'O'; - } else { - turn = 'X'; + turn = "O"; + } else { + turn = "X"; + } +} + +function game() { + if (start == true) { + removeevent(); + start = false; + reset(); + drawboard(board); + } + start = true; + document.getElementById("level").innerHTML = "

LEVEL: MULTIPLAYER

"; + endgame = false; + turn = "X"; + + reset(); + + document.getElementById("cell1").onclick = cellfunc[1]; + document.getElementById("cell2").onclick = cellfunc[2]; + document.getElementById("cell3").onclick = cellfunc[3]; + document.getElementById("cell4").onclick = cellfunc[4]; + document.getElementById("cell5").onclick = cellfunc[5]; + document.getElementById("cell6").onclick = cellfunc[6]; + document.getElementById("cell7").onclick = cellfunc[7]; + document.getElementById("cell8").onclick = cellfunc[8]; + document.getElementById("cell9").onclick = cellfunc[9]; + + document + .getElementById("cell1") + .addEventListener("click", function gameend() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + }); + document + .getElementById("cell2") + .addEventListener("click", function gameend() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + }); + document + .getElementById("cell3") + .addEventListener("click", function gameend() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + }); + document + .getElementById("cell4") + .addEventListener("click", function gameend() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + }); + document + .getElementById("cell5") + .addEventListener("click", function gameend() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + }); + document + .getElementById("cell6") + .addEventListener("click", function gameend() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + }); + document + .getElementById("cell7") + .addEventListener("click", function gameend() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + }); + document + .getElementById("cell8") + .addEventListener("click", function gameend() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + }); + document + .getElementById("cell9") + .addEventListener("click", function gameend() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + }); +} + +function game1() { + if (start == true) { + removeevent(); + start = false; + reset(); + drawboard(board); + } + start = true; + document.getElementById("level").innerHTML = "

LEVEL: EASY

"; + turn = "X"; + endgame = false; + reset(); + document.getElementById("cell1").onclick = cellfunc[1]; + document.getElementById("cell2").onclick = cellfunc[2]; + document.getElementById("cell3").onclick = cellfunc[3]; + document.getElementById("cell4").onclick = cellfunc[4]; + document.getElementById("cell5").onclick = cellfunc[5]; + document.getElementById("cell6").onclick = cellfunc[6]; + document.getElementById("cell7").onclick = cellfunc[7]; + document.getElementById("cell8").onclick = cellfunc[8]; + document.getElementById("cell9").onclick = cellfunc[9]; + + document.getElementById("cell1").addEventListener("click", function error() { + ogame1(); + }); + document.getElementById("cell2").addEventListener("click", function error() { + ogame1(); + }); + document.getElementById("cell3").addEventListener("click", function error() { + ogame1(); + }); + document.getElementById("cell4").addEventListener("click", function error() { + ogame1(); + }); + document.getElementById("cell5").addEventListener("click", function error() { + ogame1(); + }); + document.getElementById("cell6").addEventListener("click", function error() { + ogame1(); + }); + document.getElementById("cell7").addEventListener("click", function error() { + ogame1(); + }); + document.getElementById("cell8").addEventListener("click", function error() { + ogame1(); + }); + document.getElementById("cell9").addEventListener("click", function error() { + ogame1(); + }); + function ogame1() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + if (endgame == false) { + error = 1; + while (error == 1) { + error = 0; + omove = omovenum(1, 9); + if (omove < 1 || omove > 9) error = 1; + if (isNaN(board[omove]) == true) error = 1; } - - } - -function game(){ - if (start == true){removeevent(); start = false; reset(); drawboard(board);} -start = true -document.getElementById("level").innerHTML = '

LEVEL: MULTIPLAYER

' -endgame = false; -turn = "X" - -reset(); - - - -document.getElementById("cell1").onclick = cellfunc[1]; -document.getElementById("cell2").onclick = cellfunc[2]; -document.getElementById("cell3").onclick = cellfunc[3]; -document.getElementById("cell4").onclick = cellfunc[4]; -document.getElementById("cell5").onclick = cellfunc[5]; -document.getElementById("cell6").onclick = cellfunc[6]; -document.getElementById("cell7").onclick = cellfunc[7]; -document.getElementById("cell8").onclick = cellfunc[8]; -document.getElementById("cell9").onclick = cellfunc[9]; - - -document.getElementById("cell1").addEventListener("click", function gameend(){if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

';}) -document.getElementById("cell2").addEventListener("click", function gameend(){if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

';}) -document.getElementById("cell3").addEventListener("click", function gameend(){if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

';}) -document.getElementById("cell4").addEventListener("click", function gameend(){if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

';}) -document.getElementById("cell5").addEventListener("click", function gameend(){if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

';}) -document.getElementById("cell6").addEventListener("click", function gameend(){if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

';}) -document.getElementById("cell7").addEventListener("click", function gameend(){if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

';}) -document.getElementById("cell8").addEventListener("click", function gameend(){if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

';}) -document.getElementById("cell9").addEventListener("click", function gameend(){if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

';}) - + document.getElementById("cell" + omove).style.color = " #19FF19"; + document.getElementById("cell" + omove).innerHTML = turn; + board[omove] = turn; + changeTurn(); + checkO(); + checkO(); + draw1(); + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + } + } } -function game1(){ - if (start == true){removeevent(); start = false; reset(); drawboard(board);} -start = true -document.getElementById("level").innerHTML = '

LEVEL: EASY

' -turn = "X" -endgame = false; -reset(); -document.getElementById("cell1").onclick = cellfunc[1]; -document.getElementById("cell2").onclick = cellfunc[2]; -document.getElementById("cell3").onclick = cellfunc[3]; -document.getElementById("cell4").onclick = cellfunc[4]; -document.getElementById("cell5").onclick = cellfunc[5]; -document.getElementById("cell6").onclick = cellfunc[6]; -document.getElementById("cell7").onclick = cellfunc[7]; -document.getElementById("cell8").onclick = cellfunc[8]; -document.getElementById("cell9").onclick = cellfunc[9]; +function game2() { + if (start == true) { + removeevent(); + start = false; + reset(); + drawboard(board); + } + start = true; + document.getElementById("level").innerHTML = "

LEVEL: MEDIUM

"; + turn = "X"; + endgame = false; + reset(); + document.getElementById("cell1").onclick = cellfunc[1]; + document.getElementById("cell2").onclick = cellfunc[2]; + document.getElementById("cell3").onclick = cellfunc[3]; + document.getElementById("cell4").onclick = cellfunc[4]; + document.getElementById("cell5").onclick = cellfunc[5]; + document.getElementById("cell6").onclick = cellfunc[6]; + document.getElementById("cell7").onclick = cellfunc[7]; + document.getElementById("cell8").onclick = cellfunc[8]; + document.getElementById("cell9").onclick = cellfunc[9]; -document.getElementById("cell1").addEventListener("click", function error(){;ogame1();}) -document.getElementById("cell2").addEventListener("click", function error(){;ogame1();}) -document.getElementById("cell3").addEventListener("click", function error(){;ogame1();}) -document.getElementById("cell4").addEventListener("click", function error(){;ogame1();}) -document.getElementById("cell5").addEventListener("click", function error(){;ogame1();}) -document.getElementById("cell6").addEventListener("click", function error(){;ogame1();}) -document.getElementById("cell7").addEventListener("click", function error(){;ogame1();}) -document.getElementById("cell8").addEventListener("click", function error(){;ogame1();}) -document.getElementById("cell9").addEventListener("click", function error(){;ogame1();}) -function ogame1(){ -if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

' -if (endgame == false){ -error = 1; -while (error == 1){ -error = 0; -omove = omovenum(1,9); -if (omove < 1 || omove > 9) error = 1; -if (isNaN(board[omove]) == true) error = 1; + document.getElementById("cell1").addEventListener("click", function error() { + ogame2(); + }); + document.getElementById("cell2").addEventListener("click", function error() { + ogame2(); + }); + document.getElementById("cell3").addEventListener("click", function error() { + ogame2(); + }); + document.getElementById("cell4").addEventListener("click", function error() { + ogame2(); + }); + document.getElementById("cell5").addEventListener("click", function error() { + ogame2(); + }); + document.getElementById("cell6").addEventListener("click", function error() { + ogame2(); + }); + document.getElementById("cell7").addEventListener("click", function error() { + ogame2(); + }); + document.getElementById("cell8").addEventListener("click", function error() { + ogame2(); + }); + document.getElementById("cell9").addEventListener("click", function error() { + ogame2(); + }); + function ogame2() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + if (endgame == false && turn == "O") { + error = 1; + while (error == 1) { + error = 0; -} -document.getElementById("cell"+omove).style.color = " #19FF19"; -document.getElementById("cell"+omove).innerHTML = turn; -board[omove] = turn + if (board[1] == "X" && board[2] == "X" && board[3] == 3) { + omove = 3; + break; + } //missing right end (horizontal) + if (board[4] == "X" && board[5] == "X" && board[6] == 6) { + omove = 6; + break; + } + if (board[7] == "X" && board[8] == "X" && board[9] == 9) { + omove = 9; + break; + } -changeTurn(); -checkO(); -checkO(); -draw1(); -if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

' -} + if (board[1] == "X" && board[3] == "X" && board[2] == 2) { + omove = 2; + break; + } //missing middle (horizontal) + if (board[4] == "X" && board[6] == "X" && board[5] == 5) { + omove = 5; + break; + } + if (board[7] == "X" && board[9] == "X" && board[8] == 8) { + omove = 8; + break; + } + + if (board[2] == "X" && board[3] == "X" && board[1] == 1) { + omove = 1; + break; + } //missing left end (horizontal) + if (board[5] == "X" && board[6] == "X" && board[4] == 4) { + omove = 4; + break; + } + if (board[8] == "X" && board[9] == "X" && board[7] == 7) { + omove = 7; + break; + } + + if (board[1] == "X" && board[4] == "X" && board[7] == 7) { + omove = 7; + break; + } //missing bottom one (vertical) + if (board[2] == "X" && board[5] == "X" && board[8] == 8) { + omove = 8; + break; + } + if (board[3] == "X" && board[6] == "X" && board[9] == 9) { + omove = 9; + break; + } + + if (board[1] == "X" && board[7] == "X" && board[4] == 4) { + omove = 4; + break; + } //missing middle one (vertical) + if (board[2] == "X" && board[8] == "X" && board[5] == 5) { + omove = 5; + break; + } + if (board[3] == "X" && board[9] == "X" && board[6] == 6) { + omove = 6; + break; + } + + if (board[4] == "X" && board[7] == "X" && board[1] == 1) { + omove = 1; + break; + } //missing top one (vertical) + if (board[5] == "X" && board[8] == "X" && board[2] == 2) { + omove = 2; + break; + } + if (board[6] == "X" && board[9] == "X" && board[3] == 3) { + omove = 3; + break; + } + + if (board[1] == "X" && board[5] == "X" && board[9] == 9) { + omove = 9; + break; + } //missing bottom (diagnal)\ + if (board[1] == "X" && board[9] == "X" && board[5] == 5) { + omove = 5; + break; + } //missing middle (diagnal)\ + if (board[5] == "X" && board[9] == "X" && board[1] == 1) { + omove = 1; + break; + } //missing top (diagnal) \ + + if (board[3] == "X" && board[5] == "X" && board[7] == 7) { + omove = 7; + break; + } //missing bottom (diagnal) / + if (board[3] == "X" && board[7] == "X" && board[5] == 5) { + omove = 5; + break; + } //missing middle (diagnal) / + if (board[5] == "X" && board[7] == "X" && board[3] == 3) { + omove = 3; + break; + } //missing top (diagnal) / + else { + omove = omovenum(1, 9); + } + if (omove < 1 || omove > 9) error = 1; + if (isNaN(board[omove]) == true) error = 1; + } + document.getElementById("cell" + omove).style.color = " #19FF19"; + document.getElementById("cell" + omove).innerHTML = turn; + board[omove] = turn; + + changeTurn(); + checkO(); + checkO(); + draw1(); + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + } + } } +function game3() { + if (start == true) { + removeevent(); + start = false; + reset(); + drawboard(board); + } + start = true; + document.getElementById("level").innerHTML = "

LEVEL: HARD

"; + turn = "X"; + endgame = false; + reset(); + + document.getElementById("cell1").onclick = cellfunc[1]; + document.getElementById("cell2").onclick = cellfunc[2]; + document.getElementById("cell3").onclick = cellfunc[3]; + document.getElementById("cell4").onclick = cellfunc[4]; + document.getElementById("cell5").onclick = cellfunc[5]; + document.getElementById("cell6").onclick = cellfunc[6]; + document.getElementById("cell7").onclick = cellfunc[7]; + document.getElementById("cell8").onclick = cellfunc[8]; + document.getElementById("cell9").onclick = cellfunc[9]; + + document.getElementById("cell1").addEventListener("click", function error() { + ogame3(); + }); + document.getElementById("cell2").addEventListener("click", function error() { + ogame3(); + }); + document.getElementById("cell3").addEventListener("click", function error() { + ogame3(); + }); + document.getElementById("cell4").addEventListener("click", function error() { + ogame3(); + }); + document.getElementById("cell5").addEventListener("click", function error() { + ogame3(); + }); + document.getElementById("cell6").addEventListener("click", function error() { + ogame3(); + }); + document.getElementById("cell7").addEventListener("click", function error() { + ogame3(); + }); + document.getElementById("cell8").addEventListener("click", function error() { + ogame3(); + }); + document.getElementById("cell9").addEventListener("click", function error() { + ogame3(); + }); + function ogame3() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + if (endgame == false && turn == "O") { + error = 1; + while (error == 1) { + error = 0; + + if (board[1] == "O" && board[2] == "O" && board[3] == 3) { + omove = 3; + break; + } //missing right end (horizontal) + if (board[4] == "O" && board[5] == "O" && board[6] == 6) { + omove = 6; + break; + } + if (board[7] == "O" && board[8] == "O" && board[9] == 9) { + omove = 9; + break; + } + + if (board[1] == "O" && board[3] == "O" && board[2] == 2) { + omove = 2; + break; + } //missing middle (horizontal) + if (board[4] == "O" && board[6] == "O" && board[5] == 5) { + omove = 5; + break; + } + if (board[7] == "O" && board[9] == "O" && board[8] == 8) { + omove = 8; + break; + } + + if (board[2] == "O" && board[3] == "O" && board[1] == 1) { + omove = 1; + break; + } //missing left end (horizontal) + if (board[5] == "O" && board[6] == "O" && board[4] == 4) { + omove = 4; + break; + } + if (board[8] == "O" && board[9] == "O" && board[7] == 7) { + omove = 7; + break; + } + + if (board[1] == "O" && board[4] == "O" && board[7] == 7) { + omove = 7; + break; + } //missing bottom one (vertical) + if (board[2] == "O" && board[5] == "O" && board[8] == 8) { + omove = 8; + break; + } + if (board[3] == "O" && board[6] == "O" && board[9] == 9) { + omove = 9; + break; + } + + if (board[1] == "O" && board[7] == "O" && board[4] == 4) { + omove = 4; + break; + } //missing middle one (vertical) + if (board[2] == "O" && board[8] == "O" && board[5] == 5) { + omove = 5; + break; + } + if (board[3] == "O" && board[9] == "O" && board[6] == 6) { + omove = 6; + break; + } + + if (board[4] == "O" && board[7] == "O" && board[1] == 1) { + omove = 1; + break; + } //missing top one (vertical) + if (board[5] == "O" && board[8] == "O" && board[2] == 2) { + omove = 2; + break; + } + if (board[6] == "O" && board[9] == "O" && board[3] == 3) { + omove = 3; + break; + } + + if (board[1] == "O" && board[5] == "O" && board[9] == 9) { + omove = 9; + break; + } //missing bottom (diagnal)\ + if (board[1] == "O" && board[9] == "O" && board[5] == 5) { + omove = 5; + break; + } //missing middle (diagnal)\ + if (board[5] == "O" && board[9] == "O" && board[1] == 1) { + omove = 1; + break; + } //missing top (diagnal) \ + + if (board[3] == "O" && board[5] == "O" && board[7] == 7) { + omove = 7; + break; + } //missing bottom (diagnal) / + if (board[3] == "O" && board[7] == "O" && board[5] == 5) { + omove = 5; + break; + } //missing middle (diagnal) / + if (board[5] == "O" && board[7] == "O" && board[3] == 3) { + omove = 3; + break; + } //missing top (diagnal) / + + if (board[1] == "X" && board[2] == "X" && board[3] == 3) { + omove = 3; + break; + } //missing right end (horizontal) + if (board[4] == "X" && board[5] == "X" && board[6] == 6) { + omove = 6; + break; + } + if (board[7] == "X" && board[8] == "X" && board[9] == 9) { + omove = 9; + break; + } + + if (board[1] == "X" && board[3] == "X" && board[2] == 2) { + omove = 2; + break; + } //missing middle (horizontal) + if (board[4] == "X" && board[6] == "X" && board[5] == 5) { + omove = 5; + break; + } + if (board[7] == "X" && board[9] == "X" && board[8] == 8) { + omove = 8; + break; + } + + if (board[2] == "X" && board[3] == "X" && board[1] == 1) { + omove = 1; + break; + } //missing left end (horizontal) + if (board[5] == "X" && board[6] == "X" && board[4] == 4) { + omove = 4; + break; + } + if (board[8] == "X" && board[9] == "X" && board[7] == 7) { + omove = 7; + break; + } + + if (board[1] == "X" && board[4] == "X" && board[7] == 7) { + omove = 7; + break; + } //missing bottom one (vertical) + if (board[2] == "X" && board[5] == "X" && board[8] == 8) { + omove = 8; + break; + } + if (board[3] == "X" && board[6] == "X" && board[9] == 9) { + omove = 9; + break; + } + + if (board[1] == "X" && board[7] == "X" && board[4] == 4) { + omove = 4; + break; + } //missing middle one (vertical) + if (board[2] == "X" && board[8] == "X" && board[5] == 5) { + omove = 5; + break; + } + if (board[3] == "X" && board[9] == "X" && board[6] == 6) { + omove = 6; + break; + } + + if (board[4] == "X" && board[7] == "X" && board[1] == 1) { + omove = 1; + break; + } //missing top one (vertical) + if (board[5] == "X" && board[8] == "X" && board[2] == 2) { + omove = 2; + break; + } + if (board[6] == "X" && board[9] == "X" && board[3] == 3) { + omove = 3; + break; + } + + if (board[1] == "X" && board[5] == "X" && board[7] == 7) { + omove = 7; + break; + } //missing bottom (diagnal)\ + if (board[1] == "X" && board[9] == "X" && board[5] == 5) { + omove = 5; + break; + } //missing middle (diagnal)\ + if (board[5] == "X" && board[9] == "X" && board[1] == 1) { + omove = 1; + break; + } //missing top (diagnal) \ + + if (board[3] == "X" && board[5] == "X" && board[7] == 7) { + omove = 7; + break; + } //missing bottom (diagnal) / + if (board[3] == "X" && board[7] == "X" && board[5] == 5) { + omove = 5; + break; + } //missing middle (diagnal) / + if (board[5] == "X" && board[7] == "X" && board[3] == 3) { + omove = 3; + break; + } //missing top (diagnal) / + else { + omove = omovenum(1, 9); + } + if (omove < 1 || omove > 9) error = 1; + if (isNaN(board[omove]) == true) error = 1; + } + document.getElementById("cell" + omove).style.color = " #19FF19"; + document.getElementById("cell" + omove).innerHTML = turn; + board[omove] = turn; + + changeTurn(); + checkO(); + checkO(); + draw1(); + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + } + } } -function game2(){ - if (start == true){removeevent(); start = false; reset(); drawboard(board);} -start = true -document.getElementById("level").innerHTML = '

LEVEL: MEDIUM

' -turn = "X" -endgame = false; -reset(); -document.getElementById("cell1").onclick = cellfunc[1]; -document.getElementById("cell2").onclick = cellfunc[2]; -document.getElementById("cell3").onclick = cellfunc[3]; -document.getElementById("cell4").onclick = cellfunc[4]; -document.getElementById("cell5").onclick = cellfunc[5]; -document.getElementById("cell6").onclick = cellfunc[6]; -document.getElementById("cell7").onclick = cellfunc[7]; -document.getElementById("cell8").onclick = cellfunc[8]; -document.getElementById("cell9").onclick = cellfunc[9]; +function game4() { + if (start == true) { + removeevent(); + start = false; + reset(); + drawboard(board); + } + start = true; + document.getElementById("level").innerHTML = "

LEVEL: EXPERT

"; + turn = "X"; + var turnnum = 1; + endgame = false; + reset(); + if (endgame == false) { + document.getElementById("cell1").onclick = cellfunc[1]; + document.getElementById("cell2").onclick = cellfunc[2]; + document.getElementById("cell3").onclick = cellfunc[3]; + document.getElementById("cell4").onclick = cellfunc[4]; + document.getElementById("cell5").onclick = cellfunc[5]; + document.getElementById("cell6").onclick = cellfunc[6]; + document.getElementById("cell7").onclick = cellfunc[7]; + document.getElementById("cell8").onclick = cellfunc[8]; + document.getElementById("cell9").onclick = cellfunc[9]; -document.getElementById("cell1").addEventListener("click", function error(){;ogame2();}) -document.getElementById("cell2").addEventListener("click", function error(){;ogame2();}) -document.getElementById("cell3").addEventListener("click", function error(){;ogame2();}) -document.getElementById("cell4").addEventListener("click", function error(){;ogame2();}) -document.getElementById("cell5").addEventListener("click", function error(){;ogame2();}) -document.getElementById("cell6").addEventListener("click", function error(){;ogame2();}) -document.getElementById("cell7").addEventListener("click", function error(){;ogame2();}) -document.getElementById("cell8").addEventListener("click", function error(){;ogame2();}) -document.getElementById("cell9").addEventListener("click", function error(){;ogame2();}) -function ogame2(){ -if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

' -if (endgame == false && turn == "O"){ -error = 1; -while (error == 1){ -error = 0; + document + .getElementById("cell1") + .addEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell2") + .addEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell3") + .addEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell4") + .addEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell5") + .addEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell6") + .addEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell7") + .addEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell8") + .addEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell9") + .addEventListener("click", function error() { + ogame4(); + }); + } + function ogame4() { + if (endgame == true) + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + else if (endgame == false && turn == "O") { + error = 1; + while (error == 1) { + error = 0; -if (board[1] == "X" && board[2] == "X" && board[3] == 3) {omove = 3; break;}//missing right end (horizontal) -if (board[4] == "X" && board[5] == "X" && board[6] == 6) {omove = 6; break;} -if (board[7] == "X" && board[8] == "X" && board[9] == 9) {omove = 9; break;} + if (board[1] == "O" && board[2] == "O" && board[3] == 3) { + omove = 3; + break; + } //missing right end (horizontal) + if (board[4] == "O" && board[5] == "O" && board[6] == 6) { + omove = 6; + break; + } + if (board[7] == "O" && board[8] == "O" && board[9] == 9) { + omove = 9; + break; + } -if (board[1] == "X" && board[3] == "X" && board[2] == 2) {omove = 2; break;}//missing middle (horizontal) -if (board[4] == "X" && board[6] == "X" && board[5] == 5) {omove = 5; break;} -if (board[7] == "X" && board[9] == "X" && board[8] == 8) {omove = 8; break;} + if (board[1] == "O" && board[3] == "O" && board[2] == 2) { + omove = 2; + break; + } //missing middle (horizontal) + if (board[4] == "O" && board[6] == "O" && board[5] == 5) { + omove = 5; + break; + } + if (board[7] == "O" && board[9] == "O" && board[8] == 8) { + omove = 8; + break; + } -if (board[2] == "X" && board[3] == "X" && board[1] == 1) {omove = 1; break;}//missing left end (horizontal) -if (board[5] == "X" && board[6] == "X" && board[4] == 4) {omove = 4; break;} -if (board[8] == "X" && board[9] == "X" && board[7] == 7) {omove = 7; break;} + if (board[2] == "O" && board[3] == "O" && board[1] == 1) { + omove = 1; + break; + } //missing left end (horizontal) + if (board[5] == "O" && board[6] == "O" && board[4] == 4) { + omove = 4; + break; + } + if (board[8] == "O" && board[9] == "O" && board[7] == 7) { + omove = 7; + break; + } -if (board[1] == "X" && board[4] == "X" && board[7] == 7) {omove = 7; break;}//missing bottom one (vertical) -if (board[2] == "X" && board[5] == "X" && board[8] == 8) {omove = 8; break;} -if (board[3] == "X" && board[6] == "X" && board[9] == 9) {omove = 9; break;} + if (board[1] == "O" && board[4] == "O" && board[7] == 7) { + omove = 7; + break; + } //missing bottom one (vertical) + if (board[2] == "O" && board[5] == "O" && board[8] == 8) { + omove = 8; + break; + } + if (board[3] == "O" && board[6] == "O" && board[9] == 9) { + omove = 9; + break; + } -if (board[1] == "X" && board[7] == "X" && board[4] == 4) {omove = 4; break;}//missing middle one (vertical) -if (board[2] == "X" && board[8] == "X" && board[5] == 5) {omove = 5; break;} -if (board[3] == "X" && board[9] == "X" && board[6] == 6) {omove = 6; break;} + if (board[1] == "O" && board[7] == "O" && board[4] == 4) { + omove = 4; + break; + } //missing middle one (vertical) + if (board[2] == "O" && board[8] == "O" && board[5] == 5) { + omove = 5; + break; + } + if (board[3] == "O" && board[9] == "O" && board[6] == 6) { + omove = 6; + break; + } -if (board[4] == "X" && board[7] == "X" && board[1] == 1) {omove = 1; break;}//missing top one (vertical) -if (board[5] == "X" && board[8] == "X" && board[2] == 2) {omove = 2; break;} -if (board[6] == "X" && board[9] == "X" && board[3] == 3) {omove = 3; break;} + if (board[4] == "O" && board[7] == "O" && board[1] == 1) { + omove = 1; + break; + } //missing top one (vertical) + if (board[5] == "O" && board[8] == "O" && board[2] == 2) { + omove = 2; + break; + } + if (board[6] == "O" && board[9] == "O" && board[3] == 3) { + omove = 3; + break; + } -if (board[1] == "X" && board[5] == "X" && board[9] == 9) {omove = 9; break;}//missing bottom (diagnal)\ -if (board[1] == "X" && board[9] == "X" && board[5] == 5) {omove = 5; break;}//missing middle (diagnal)\ -if (board[5] == "X" && board[9] == "X" && board[1] == 1) {omove = 1; break;}//missing top (diagnal) \ + if (board[1] == "O" && board[5] == "O" && board[9] == 9) { + omove = 9; + break; + } //missing bottom (diagnal)\ + if (board[1] == "O" && board[9] == "O" && board[5] == 5) { + omove = 5; + break; + } //missing middle (diagnal)\ + if (board[5] == "O" && board[9] == "O" && board[1] == 1) { + omove = 1; + break; + } //missing top (diagnal) \ -if (board[3] == "X" && board[5] == "X" && board[7] == 7) {omove = 7; break;}//missing bottom (diagnal) / -if (board[3] == "X" && board[7] == "X" && board[5] == 5) {omove = 5; break;}//missing middle (diagnal) / -if (board[5] == "X" && board[7] == "X" && board[3] == 3) {omove = 3; break;}//missing top (diagnal) / + if (board[3] == "O" && board[5] == "O" && board[7] == 7) { + omove = 7; + break; + } //missing bottom (diagnal) / + if (board[3] == "O" && board[7] == "O" && board[5] == 5) { + omove = 5; + break; + } //missing middle (diagnal) / + if (board[5] == "O" && board[7] == "O" && board[3] == 3) { + omove = 3; + break; + } //missing top (diagnal) / + if (board[1] == "X" && board[2] == "X" && board[3] == 3) { + omove = 3; + break; + } //missing right end (horizontal) + if (board[4] == "X" && board[5] == "X" && board[6] == 6) { + omove = 6; + break; + } + if (board[7] == "X" && board[8] == "X" && board[9] == 9) { + omove = 9; + break; + } + if (board[1] == "X" && board[3] == "X" && board[2] == 2) { + omove = 2; + break; + } //missing middle (horizontal) + if (board[4] == "X" && board[6] == "X" && board[5] == 5) { + omove = 5; + break; + } + if (board[7] == "X" && board[9] == "X" && board[8] == 8) { + omove = 8; + break; + } -else {omove = omovenum(1,9);} -if (omove < 1 || omove > 9) error = 1; -if (isNaN(board[omove]) == true) error = 1; + if (board[2] == "X" && board[3] == "X" && board[1] == 1) { + omove = 1; + break; + } //missing left end (horizontal) + if (board[5] == "X" && board[6] == "X" && board[4] == 4) { + omove = 4; + break; + } + if (board[8] == "X" && board[9] == "X" && board[7] == 7) { + omove = 7; + break; + } -} -document.getElementById("cell"+omove).style.color = " #19FF19"; -document.getElementById("cell"+omove).innerHTML = turn; -board[omove] = turn + if (board[1] == "X" && board[4] == "X" && board[7] == 7) { + omove = 7; + break; + } //missing bottom one (vertical) + if (board[2] == "X" && board[5] == "X" && board[8] == 8) { + omove = 8; + break; + } + if (board[3] == "X" && board[6] == "X" && board[9] == 9) { + omove = 9; + break; + } -changeTurn(); -checkO(); -checkO(); -draw1(); -if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

' -} + if (board[1] == "X" && board[7] == "X" && board[4] == 4) { + omove = 4; + break; + } //missing middle one (vertical) + if (board[2] == "X" && board[8] == "X" && board[5] == 5) { + omove = 5; + break; + } + if (board[3] == "X" && board[9] == "X" && board[6] == 6) { + omove = 6; + break; + } + + if (board[4] == "X" && board[7] == "X" && board[1] == 1) { + omove = 1; + break; + } //missing top one (vertical) + if (board[5] == "X" && board[8] == "X" && board[2] == 2) { + omove = 2; + break; + } + if (board[6] == "X" && board[9] == "X" && board[3] == 3) { + omove = 3; + break; + } + + if (board[1] == "X" && board[5] == "X" && board[9] == 9) { + omove = 9; + break; + } //missing bottom (diagnal)\ + if (board[1] == "X" && board[9] == "X" && board[5] == 5) { + omove = 5; + break; + } //missing middle (diagnal)\ + if (board[5] == "X" && board[9] == "X" && board[1] == 1) { + omove = 1; + break; + } //missing top (diagnal) \ + + if (board[3] == "X" && board[5] == "X" && board[7] == 7) { + omove = 7; + break; + } //missing bottom (diagnal) / + if (board[3] == "X" && board[7] == "X" && board[5] == 5) { + omove = 5; + break; + } //missing middle (diagnal) / + if (board[5] == "X" && board[7] == "X" && board[3] == 3) { + omove = 3; + break; + } //missing top (diagnal) / + + //alert(turnnum) + + if (turnnum == 1) { + //alert(turnnum+" Turn"); + if ( + board[1] == "X" || + board[3] == "X" || + board[7] == "X" || + board[9] == "X" + ) { + omove = 5; + break; + } //first turn + if (board[5] == "X") { + omove = 1; + break; + } //first turn + if ( + board[2] == "X" || + board[6] == "X" || + board[8] == "X" || + board[4] == "X" + ) { + omove = 5; + break; + } else { + omove = omovenum(1, 9); + } + if (omove < 1 || omove > 9) error = 1; + if (isNaN(board[omove]) == true) error = 1; + } + if (turnnum == 2) { + //alert(turnnum+" Turn"); + if (board[5] == "X" && board[9] == "X" && board[3] == 3) { + omove = 3; + break; + } + if (board[4] == "X" && board[3] == "X" && board[7] == 7) { + omove = 7; + break; + } + if (board[4] == "X" && board[8] == "X" && board[7] == 7) { + omove = 7; + break; + } + if (board[6] == "X" && board[8] == "X" && board[9] == 9) { + omove = 9; + break; + } + if (board[1] == "X" && board[8] == "X" && board[4] == 4) { + omove = 4; + break; + } + if (board[2] == "X" && board[4] == "X" && board[1] == 1) { + omove = 1; + break; + } + if (board[2] == "X" && board[6] == "X" && board[3] == 3) { + omove = 3; + break; + } + if (board[2] == "X" && board[9] == "X" && board[6] == 6) { + omove = 3; + break; + } + if (board[1] == "X" && board[6] == "X" && board[4] == 4) { + omove = 3; + break; + } + if (board[1] == "X" && board[2] == 2) { + omove = 2; + break; + } + if (board[3] == "X" && board[4] == 4) { + omove = 4; + break; + } + if (board[7] == "X" && board[6] == 6) { + omove = 6; + break; + } + if (board[9] == "X" && board[8] == 8) { + omove = 8; + break; + } else { + omove = omovenum(1, 9); + } + if (omove < 1 || omove > 9) error = 1; + if (isNaN(board[omove]) == true) error = 1; + } + if (turnnum == 3) { + //alert(turnnum+" Turn"); + if (board[4] == "X" && board[6] == "X" && board[9] == 9) { + omove = 9; + break; + } + if ( + board[9] == "X" && + board[4] == "X" && + board[2] == "X" && + board[1] == 1 + ) { + omove = 1; + break; + } else { + omove = omovenum(1, 9); + } + if (omove < 1 || omove > 9) error = 1; + if (isNaN(board[omove]) == true) error = 1; + } else { + omove = omovenum(1, 9); + } + //alert(omove+" omove"); + if (omove < 1 || omove > 9) error = 1; + if (isNaN(board[omove]) == true) error = 1; + } + //alert(omove); + document.getElementById("cell" + omove).style.color = " #19FF19"; + document.getElementById("cell" + omove).innerHTML = turn; + board[omove] = turn; + turnnum++; + //alert("after turn "+turnnum) + changeTurn(); + checkO(); + checkO(); + draw1(); + if (endgame == true) { + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + error = 0; + } + } + } } +function omovenum(min, max) { + return Math.floor(Math.random() * (max - min + 1) + min); } -function game3(){ - if (start == true){removeevent(); start = false; reset(); drawboard(board);} -start = true -document.getElementById("level").innerHTML = '

LEVEL: HARD

' -turn = "X" -endgame = false; -reset(); - -document.getElementById("cell1").onclick = cellfunc[1]; -document.getElementById("cell2").onclick = cellfunc[2]; -document.getElementById("cell3").onclick = cellfunc[3]; -document.getElementById("cell4").onclick = cellfunc[4]; -document.getElementById("cell5").onclick = cellfunc[5]; -document.getElementById("cell6").onclick = cellfunc[6]; -document.getElementById("cell7").onclick = cellfunc[7]; -document.getElementById("cell8").onclick = cellfunc[8]; -document.getElementById("cell9").onclick = cellfunc[9]; - -document.getElementById("cell1").addEventListener("click", function error(){;ogame3();}) -document.getElementById("cell2").addEventListener("click", function error(){;ogame3();}) -document.getElementById("cell3").addEventListener("click", function error(){;ogame3();}) -document.getElementById("cell4").addEventListener("click", function error(){;ogame3();}) -document.getElementById("cell5").addEventListener("click", function error(){;ogame3();}) -document.getElementById("cell6").addEventListener("click", function error(){;ogame3();}) -document.getElementById("cell7").addEventListener("click", function error(){;ogame3();}) -document.getElementById("cell8").addEventListener("click", function error(){;ogame3();}) -document.getElementById("cell9").addEventListener("click", function error(){;ogame3();}) -function ogame3(){ -if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

' -if (endgame == false && turn == "O"){ -error = 1; -while (error == 1){ -error = 0; - - -if (board[1] == "O" && board[2] == "O" && board[3] == 3) {omove = 3; break;}//missing right end (horizontal) -if (board[4] == "O" && board[5] == "O" && board[6] == 6) {omove = 6; break;} -if (board[7] == "O" && board[8] == "O" && board[9] == 9) {omove = 9; break;} - -if (board[1] == "O" && board[3] == "O" && board[2] == 2) {omove = 2; break;}//missing middle (horizontal) -if (board[4] == "O" && board[6] == "O" && board[5] == 5) {omove = 5; break;} -if (board[7] == "O" && board[9] == "O" && board[8] == 8) {omove = 8; break;} - -if (board[2] == "O" && board[3] == "O" && board[1] == 1) {omove = 1; break;}//missing left end (horizontal) -if (board[5] == "O" && board[6] == "O" && board[4] == 4) {omove = 4; break;} -if (board[8] == "O" && board[9] == "O" && board[7] == 7) {omove = 7; break;} - -if (board[1] == "O" && board[4] == "O" && board[7] == 7) {omove = 7; break;}//missing bottom one (vertical) -if (board[2] == "O" && board[5] == "O" && board[8] == 8) {omove = 8; break;} -if (board[3] == "O" && board[6] == "O" && board[9] == 9) {omove = 9; break;} - -if (board[1] == "O" && board[7] == "O" && board[4] == 4) {omove = 4; break;}//missing middle one (vertical) -if (board[2] == "O" && board[8] == "O" && board[5] == 5) {omove = 5; break;} -if (board[3] == "O" && board[9] == "O" && board[6] == 6) {omove = 6; break;} - -if (board[4] == "O" && board[7] == "O" && board[1] == 1) {omove = 1; break;}//missing top one (vertical) -if (board[5] == "O" && board[8] == "O" && board[2] == 2) {omove = 2; break;} -if (board[6] == "O" && board[9] == "O" && board[3] == 3) {omove = 3; break;} - -if (board[1] == "O" && board[5] == "O" && board[9] == 9) {omove = 9; break;}//missing bottom (diagnal)\ -if (board[1] == "O" && board[9] == "O" && board[5] == 5) {omove = 5; break;}//missing middle (diagnal)\ -if (board[5] == "O" && board[9] == "O" && board[1] == 1) {omove = 1; break;}//missing top (diagnal) \ - -if (board[3] == "O" && board[5] == "O" && board[7] == 7) {omove = 7; break;}//missing bottom (diagnal) / -if (board[3] == "O" && board[7] == "O" && board[5] == 5) {omove = 5; break;}//missing middle (diagnal) / -if (board[5] == "O" && board[7] == "O" && board[3] == 3) {omove = 3; break;}//missing top (diagnal) / - - - -if (board[1] == "X" && board[2] == "X" && board[3] == 3) {omove = 3; break;}//missing right end (horizontal) -if (board[4] == "X" && board[5] == "X" && board[6] == 6) {omove = 6; break;} -if (board[7] == "X" && board[8] == "X" && board[9] == 9) {omove = 9; break;} - -if (board[1] == "X" && board[3] == "X" && board[2] == 2) {omove = 2; break;}//missing middle (horizontal) -if (board[4] == "X" && board[6] == "X" && board[5] == 5) {omove = 5; break;} -if (board[7] == "X" && board[9] == "X" && board[8] == 8) {omove = 8; break;} - -if (board[2] == "X" && board[3] == "X" && board[1] == 1) {omove = 1; break;}//missing left end (horizontal) -if (board[5] == "X" && board[6] == "X" && board[4] == 4) {omove = 4; break;} -if (board[8] == "X" && board[9] == "X" && board[7] == 7) {omove = 7; break;} - -if (board[1] == "X" && board[4] == "X" && board[7] == 7) {omove = 7; break;}//missing bottom one (vertical) -if (board[2] == "X" && board[5] == "X" && board[8] == 8) {omove = 8; break;} -if (board[3] == "X" && board[6] == "X" && board[9] == 9) {omove = 9; break;} - -if (board[1] == "X" && board[7] == "X" && board[4] == 4) {omove = 4; break;}//missing middle one (vertical) -if (board[2] == "X" && board[8] == "X" && board[5] == 5) {omove = 5; break;} -if (board[3] == "X" && board[9] == "X" && board[6] == 6) {omove = 6; break;} - -if (board[4] == "X" && board[7] == "X" && board[1] == 1) {omove = 1; break;}//missing top one (vertical) -if (board[5] == "X" && board[8] == "X" && board[2] == 2) {omove = 2; break;} -if (board[6] == "X" && board[9] == "X" && board[3] == 3) {omove = 3; break;} - -if (board[1] == "X" && board[5] == "X" && board[7] == 7) {omove = 7; break;}//missing bottom (diagnal)\ -if (board[1] == "X" && board[9] == "X" && board[5] == 5) {omove = 5; break;}//missing middle (diagnal)\ -if (board[5] == "X" && board[9] == "X" && board[1] == 1) {omove = 1; break;}//missing top (diagnal) \ - -if (board[3] == "X" && board[5] == "X" && board[7] == 7) {omove = 7; break;}//missing bottom (diagnal) / -if (board[3] == "X" && board[7] == "X" && board[5] == 5) {omove = 5; break;}//missing middle (diagnal) / -if (board[5] == "X" && board[7] == "X" && board[3] == 3) {omove = 3; break;}//missing top (diagnal) / - -else {omove = omovenum(1,9);} -if (omove < 1 || omove > 9) error = 1; -if (isNaN(board[omove]) == true) error = 1; - -} -document.getElementById("cell"+omove).style.color = " #19FF19"; -document.getElementById("cell"+omove).innerHTML = turn; -board[omove] = turn - -changeTurn(); -checkO(); -checkO(); -draw1(); -if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

' -} -} +function reset() { + for (i = 1; i < 10; i++) board[i] = i; + document.getElementById("cell1").innerHTML = 1; + document.getElementById("cell2").innerHTML = 2; + document.getElementById("cell3").innerHTML = 3; + document.getElementById("cell4").innerHTML = 4; + document.getElementById("cell5").innerHTML = 5; + document.getElementById("cell6").innerHTML = 6; + document.getElementById("cell7").innerHTML = 7; + document.getElementById("cell8").innerHTML = 8; + document.getElementById("cell9").innerHTML = 9; } -function game4(){ - if (start == true){removeevent(); start = false; reset(); drawboard(board);} -start = true -document.getElementById("level").innerHTML = '

LEVEL: EXPERT

' -turn = "X" -var turnnum = 1 -endgame = false; -reset(); -if (endgame == false){ -document.getElementById("cell1").onclick = cellfunc[1]; -document.getElementById("cell2").onclick = cellfunc[2]; -document.getElementById("cell3").onclick = cellfunc[3]; -document.getElementById("cell4").onclick = cellfunc[4]; -document.getElementById("cell5").onclick = cellfunc[5]; -document.getElementById("cell6").onclick = cellfunc[6]; -document.getElementById("cell7").onclick = cellfunc[7]; -document.getElementById("cell8").onclick = cellfunc[8]; -document.getElementById("cell9").onclick = cellfunc[9]; - -document.getElementById("cell1").addEventListener("click", function error(){;ogame4();}) -document.getElementById("cell2").addEventListener("click", function error(){;ogame4();}) -document.getElementById("cell3").addEventListener("click", function error(){;ogame4();}) -document.getElementById("cell4").addEventListener("click", function error(){;ogame4();}) -document.getElementById("cell5").addEventListener("click", function error(){;ogame4();}) -document.getElementById("cell6").addEventListener("click", function error(){;ogame4();}) -document.getElementById("cell7").addEventListener("click", function error(){;ogame4();}) -document.getElementById("cell8").addEventListener("click", function error(){;ogame4();}) -document.getElementById("cell9").addEventListener("click", function error(){;ogame4();}) -} -function ogame4(){ - - -if (endgame == true) document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

' -else if (endgame == false && turn == "O"){ - - - -error = 1; -while (error == 1){ -error = 0; - - - -if (board[1] == "O" && board[2] == "O" && board[3] == 3) {omove = 3; break;}//missing right end (horizontal) -if (board[4] == "O" && board[5] == "O" && board[6] == 6) {omove = 6; break;} -if (board[7] == "O" && board[8] == "O" && board[9] == 9) {omove = 9; break;} - -if (board[1] == "O" && board[3] == "O" && board[2] == 2) {omove = 2; break;}//missing middle (horizontal) -if (board[4] == "O" && board[6] == "O" && board[5] == 5) {omove = 5; break;} -if (board[7] == "O" && board[9] == "O" && board[8] == 8) {omove = 8; break;} - -if (board[2] == "O" && board[3] == "O" && board[1] == 1) {omove = 1; break;}//missing left end (horizontal) -if (board[5] == "O" && board[6] == "O" && board[4] == 4) {omove = 4; break;} -if (board[8] == "O" && board[9] == "O" && board[7] == 7) {omove = 7; break;} - -if (board[1] == "O" && board[4] == "O" && board[7] == 7) {omove = 7; break;}//missing bottom one (vertical) -if (board[2] == "O" && board[5] == "O" && board[8] == 8) {omove = 8; break;} -if (board[3] == "O" && board[6] == "O" && board[9] == 9) {omove = 9; break;} - -if (board[1] == "O" && board[7] == "O" && board[4] == 4) {omove = 4; break;}//missing middle one (vertical) -if (board[2] == "O" && board[8] == "O" && board[5] == 5) {omove = 5; break;} -if (board[3] == "O" && board[9] == "O" && board[6] == 6) {omove = 6; break;} - -if (board[4] == "O" && board[7] == "O" && board[1] == 1) {omove = 1; break;}//missing top one (vertical) -if (board[5] == "O" && board[8] == "O" && board[2] == 2) {omove = 2; break;} -if (board[6] == "O" && board[9] == "O" && board[3] == 3) {omove = 3; break;} - -if (board[1] == "O" && board[5] == "O" && board[9] == 9) {omove = 9; break;}//missing bottom (diagnal)\ -if (board[1] == "O" && board[9] == "O" && board[5] == 5) {omove = 5; break;}//missing middle (diagnal)\ -if (board[5] == "O" && board[9] == "O" && board[1] == 1) {omove = 1; break;}//missing top (diagnal) \ - -if (board[3] == "O" && board[5] == "O" && board[7] == 7) {omove = 7; break;}//missing bottom (diagnal) / -if (board[3] == "O" && board[7] == "O" && board[5] == 5) {omove = 5; break;}//missing middle (diagnal) / -if (board[5] == "O" && board[7] == "O" && board[3] == 3) {omove = 3; break;}//missing top (diagnal) / - - - -if (board[1] == "X" && board[2] == "X" && board[3] == 3) {omove = 3; break;}//missing right end (horizontal) -if (board[4] == "X" && board[5] == "X" && board[6] == 6) {omove = 6; break;} -if (board[7] == "X" && board[8] == "X" && board[9] == 9) {omove = 9; break;} - -if (board[1] == "X" && board[3] == "X" && board[2] == 2) {omove = 2; break;}//missing middle (horizontal) -if (board[4] == "X" && board[6] == "X" && board[5] == 5) {omove = 5; break;} -if (board[7] == "X" && board[9] == "X" && board[8] == 8) {omove = 8; break;} - -if (board[2] == "X" && board[3] == "X" && board[1] == 1) {omove = 1; break;}//missing left end (horizontal) -if (board[5] == "X" && board[6] == "X" && board[4] == 4) {omove = 4; break;} -if (board[8] == "X" && board[9] == "X" && board[7] == 7) {omove = 7; break;} - -if (board[1] == "X" && board[4] == "X" && board[7] == 7) {omove = 7; break;}//missing bottom one (vertical) -if (board[2] == "X" && board[5] == "X" && board[8] == 8) {omove = 8; break;} -if (board[3] == "X" && board[6] == "X" && board[9] == 9) {omove = 9; break;} - -if (board[1] == "X" && board[7] == "X" && board[4] == 4) {omove = 4; break;}//missing middle one (vertical) -if (board[2] == "X" && board[8] == "X" && board[5] == 5) {omove = 5; break;} -if (board[3] == "X" && board[9] == "X" && board[6] == 6) {omove = 6; break;} - -if (board[4] == "X" && board[7] == "X" && board[1] == 1) {omove = 1; break;}//missing top one (vertical) -if (board[5] == "X" && board[8] == "X" && board[2] == 2) {omove = 2; break;} -if (board[6] == "X" && board[9] == "X" && board[3] == 3) {omove = 3; break;} - -if (board[1] == "X" && board[5] == "X" && board[9] == 9) {omove = 9; break;}//missing bottom (diagnal)\ -if (board[1] == "X" && board[9] == "X" && board[5] == 5) {omove = 5; break;}//missing middle (diagnal)\ -if (board[5] == "X" && board[9] == "X" && board[1] == 1) {omove = 1; break;}//missing top (diagnal) \ - -if (board[3] == "X" && board[5] == "X" && board[7] == 7) {omove = 7; break;}//missing bottom (diagnal) / -if (board[3] == "X" && board[7] == "X" && board[5] == 5) {omove = 5; break;}//missing middle (diagnal) / -if (board[5] == "X" && board[7] == "X" && board[3] == 3) {omove = 3; break;}//missing top (diagnal) / - - -//alert(turnnum) - -if (turnnum == 1 ){ -//alert(turnnum+" Turn"); -if (board[1] == "X" || board[3] == "X" || board[7] == "X" || board[9] == "X") {omove = 5; break;}//first turn -if (board[5] == "X" ) {omove = 1; break;}//first turn -if (board[2] == "X" || board[6] == "X" || board[8] == "X" || board[4] == "X") {omove = 5; break;} -else {omove = omovenum(1,9);} -if (omove < 1 || omove > 9) error = 1; -if (isNaN(board[omove]) == true) error = 1; -} -if (turnnum == 2){ -//alert(turnnum+" Turn"); -if (board[5] == "X" && board[9] == "X" && board[3] == 3) {omove = 3; break;} -if (board[4] == "X" && board[3] == "X" && board[7] == 7) {omove = 7; break;} -if (board[4] == "X" && board[8] == "X" && board[7] == 7) {omove = 7; break;} -if (board[6] == "X" && board[8] == "X" && board[9] == 9) {omove = 9; break;} -if (board[1] == "X" && board[8] == "X" && board[4] == 4) {omove = 4; break;} -if (board[2] == "X" && board[4] == "X" && board[1] == 1) {omove = 1; break;} -if (board[2] == "X" && board[6] == "X" && board[3] == 3) {omove = 3; break;} -if (board[2] == "X" && board[9] == "X" && board[6] == 6) {omove = 3; break;} -if (board[1] == "X" && board[6] == "X" && board[4] == 4) {omove = 3; break;} -if (board[1] == "X" && board[2] == 2) {omove = 2; break;} -if (board[3] == "X" && board[4] == 4) {omove = 4; break;} -if (board[7] == "X" && board[6] == 6) {omove = 6; break;} -if (board[9] == "X" && board[8] == 8) {omove = 8; break;} -else {omove = omovenum(1,9);} -if (omove < 1 || omove > 9) error = 1; -if (isNaN(board[omove]) == true) error = 1; - } - if (turnnum == 3){ -//alert(turnnum+" Turn"); -if (board[4] == "X" && board[6] == "X" && board[9] == 9) {omove = 9; break;} -if (board[9] == "X" && board[4] == "X" && board[2] =="X" && board[1] == 1) {omove = 1; break;} -else {omove = omovenum(1,9);} -if (omove < 1 || omove > 9) error = 1; -if (isNaN(board[omove]) == true) error = 1; - } -else {omove = omovenum(1,9);} -//alert(omove+" omove"); -if (omove < 1 || omove > 9) error = 1; -if (isNaN(board[omove]) == true) error = 1; - -} -//alert(omove); -document.getElementById("cell"+omove).style.color = " #19FF19"; -document.getElementById("cell"+omove).innerHTML = turn; -board[omove] = turn -turnnum++ -//alert("after turn "+turnnum) -changeTurn(); -checkO(); -checkO(); -draw1(); -if (endgame == true) {document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

'; error = 0;} -} +function draw1() { + if (endgame == false) { + for (i = 0, bcount = 0; i <= 9; i++) if (isNaN(board[i]) == false) bcount++; + if (bcount == 0) { + alert("Draw"); + endgame = true; + draw++; + if (endgame == true) { + document.getElementById("level").innerHTML = "

CHOOSE A LEVEL

"; + score(); + removeevent(); + } + } + } } +function checkX() { + if (endgame == false) { + if (board[1] == "X" && board[2] == "X" && board[3] == "X") { + alert("X wins!"); + endgame = true; + xwin++; + score(); + removeevent(); + } + if (board[4] == "X" && board[5] == "X" && board[6] == "X") { + alert("X wins!"); + endgame = true; + xwin++; + score(); + removeevent(); + } + if (board[7] == "X" && board[8] == "X" && board[9] == "X") { + alert("X wins!"); + endgame = true; + xwin++; + score(); + removeevent(); + } + if (board[1] == "X" && board[5] == "X" && board[9] == "X") { + alert("X wins!"); + endgame = true; + xwin++; + score(); + removeevent(); + } + if (board[3] == "X" && board[5] == "X" && board[7] == "X") { + alert("X wins!"); + endgame = true; + xwin++; + score(); + removeevent(); + } + if (board[1] == "X" && board[4] == "X" && board[7] == "X") { + alert("X wins!"); + endgame = true; + xwin++; + score(); + removeevent(); + } + if (board[2] == "X" && board[5] == "X" && board[8] == "X") { + alert("X wins!"); + endgame = true; + xwin++; + score(); + removeevent(); + } + if (board[3] == "X" && board[6] == "X" && board[9] == "X") { + alert("X wins!"); + endgame = true; + xwin++; + score(); + removeevent(); + } + //if (endgame == true){ removeevent();alert("endgame "+endgame +" checkx")} + } } - -function omovenum(min,max){ - return Math.floor(Math.random()*(max-min+1)+min); -}; - - -function reset(){ - -for (i=1; i<10; i++) board[i] = i; -document.getElementById("cell1").innerHTML = 1 -document.getElementById("cell2").innerHTML = 2 -document.getElementById("cell3").innerHTML = 3 -document.getElementById("cell4").innerHTML = 4 -document.getElementById("cell5").innerHTML = 5 -document.getElementById("cell6").innerHTML = 6 -document.getElementById("cell7").innerHTML = 7 -document.getElementById("cell8").innerHTML = 8 -document.getElementById("cell9").innerHTML = 9 +function checkO() { + if (endgame == false) { + if (board[1] == "O" && board[2] == "O" && board[3] == "O") { + alert("O wins!"); + endgame = true; + owin++; + score(); + removeevent(); + } + if (board[4] == "O" && board[5] == "O" && board[6] == "O") { + alert("O wins!"); + endgame = true; + owin++; + score(); + removeevent(); + } + if (board[7] == "O" && board[8] == "O" && board[9] == "O") { + alert("O wins!"); + endgame = true; + owin++; + score(); + removeevent(); + } + if (board[1] == "O" && board[5] == "O" && board[9] == "O") { + alert("O wins!"); + endgame = true; + owin++; + score(); + removeevent(); + } + if (board[3] == "O" && board[5] == "O" && board[7] == "O") { + alert("O wins!"); + endgame = true; + owin++; + score(); + removeevent(); + } + if (board[1] == "O" && board[4] == "O" && board[7] == "O") { + alert("O wins!"); + endgame = true; + owin++; + score(); + removeevent(); + } + if (board[2] == "O" && board[5] == "O" && board[8] == "O") { + alert("O wins!"); + endgame = true; + owin++; + score(); + removeevent(); + } + if (board[3] == "O" && board[6] == "O" && board[9] == "O") { + alert("O wins!"); + endgame = true; + owin++; + score(); + removeevent(); + } + //if (endgame == true) { removeevent();alert("endgame "+endgame +" checkO")} + } } +function removeevent() { + document + .getElementById("cell1") + .removeEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell2") + .removeEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell3") + .removeEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell4") + .removeEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell5") + .removeEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell6") + .removeEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell7") + .removeEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell8") + .removeEventListener("click", function error() { + ogame4(); + }); + document + .getElementById("cell9") + .removeEventListener("click", function error() { + ogame4(); + }); -function draw1(){ -if (endgame == false){ -for (i=0, bcount=0; i<=9;i++)if (isNaN(board[i]) == false)bcount++; -if(bcount==0){alert("Draw"); endgame = true; draw++; if (endgame == true) { document.getElementById("level").innerHTML = '

CHOOSE A LEVEL

';score();removeevent();} -} -} -} -function checkX(){ -if (endgame == false){ -if (board[1] == "X" && board[2] == "X" && board[3] == "X"){ alert("X wins!"); endgame = true; xwin++;score();removeevent();} -if (board[4] == "X" && board[5] == "X" && board[6] == "X"){ alert("X wins!"); endgame = true; xwin++;score();removeevent();} -if (board[7] == "X" && board[8] == "X" && board[9] == "X"){ alert("X wins!"); endgame = true; xwin++;score();removeevent();} -if (board[1] == "X" && board[5] == "X" && board[9] == "X"){ alert("X wins!"); endgame = true; xwin++;score();removeevent();} -if (board[3] == "X" && board[5] == "X" && board[7] == "X"){ alert("X wins!"); endgame = true; xwin++;score();removeevent();} -if (board[1] == "X" && board[4] == "X" && board[7] == "X"){ alert("X wins!"); endgame = true; xwin++;score();removeevent();} -if (board[2] == "X" && board[5] == "X" && board[8] == "X"){ alert("X wins!"); endgame = true; xwin++;score();removeevent();} -if (board[3] == "X" && board[6] == "X" && board[9] == "X"){ alert("X wins!"); endgame = true; xwin++;score();removeevent();} -//if (endgame == true){ removeevent();alert("endgame "+endgame +" checkx")} -} -} + document + .getElementById("cell1") + .removeEventListener("click", function error() { + ogame3(); + }); + document + .getElementById("cell2") + .removeEventListener("click", function error() { + ogame3(); + }); + document + .getElementById("cell3") + .removeEventListener("click", function error() { + ogame3(); + }); + document + .getElementById("cell4") + .removeEventListener("click", function error() { + ogame3(); + }); + document + .getElementById("cell5") + .removeEventListener("click", function error() { + ogame3(); + }); + document + .getElementById("cell6") + .removeEventListener("click", function error() { + ogame3(); + }); + document + .getElementById("cell7") + .removeEventListener("click", function error() { + ogame3(); + }); + document + .getElementById("cell8") + .removeEventListener("click", function error() { + ogame3(); + }); + document + .getElementById("cell9") + .removeEventListener("click", function error() { + ogame3(); + }); + document + .getElementById("cell1") + .removeEventListener("click", function error() { + ogame2(); + }); + document + .getElementById("cell2") + .removeEventListener("click", function error() { + ogame2(); + }); + document + .getElementById("cell3") + .removeEventListener("click", function error() { + ogame2(); + }); + document + .getElementById("cell4") + .removeEventListener("click", function error() { + ogame2(); + }); + document + .getElementById("cell5") + .removeEventListener("click", function error() { + ogame2(); + }); + document + .getElementById("cell6") + .removeEventListener("click", function error() { + ogame2(); + }); + document + .getElementById("cell7") + .removeEventListener("click", function error() { + ogame2(); + }); + document + .getElementById("cell8") + .removeEventListener("click", function error() { + ogame2(); + }); + document + .getElementById("cell9") + .removeEventListener("click", function error() { + ogame2(); + }); -function checkO(){ -if (endgame == false){ -if (board[1] == "O" && board[2] == "O" && board[3] == "O"){ alert("O wins!"); endgame = true; owin++;score();removeevent();} -if (board[4] == "O" && board[5] == "O" && board[6] == "O"){ alert("O wins!"); endgame = true; owin++;score();removeevent();} -if (board[7] == "O" && board[8] == "O" && board[9] == "O"){ alert("O wins!"); endgame = true; owin++;score();removeevent();} -if (board[1] == "O" && board[5] == "O" && board[9] == "O"){ alert("O wins!"); endgame = true; owin++;score();removeevent();} -if (board[3] == "O" && board[5] == "O" && board[7] == "O"){ alert("O wins!"); endgame = true; owin++;score();removeevent();} -if (board[1] == "O" && board[4] == "O" && board[7] == "O"){ alert("O wins!"); endgame = true; owin++;score();removeevent();} -if (board[2] == "O" && board[5] == "O" && board[8] == "O"){ alert("O wins!"); endgame = true; owin++;score();removeevent();} -if (board[3] == "O" && board[6] == "O" && board[9] == "O"){ alert("O wins!"); endgame = true; owin++;score();removeevent();} -//if (endgame == true) { removeevent();alert("endgame "+endgame +" checkO")} + document + .getElementById("cell1") + .removeEventListener("click", function error() { + ogame1(); + }); + document + .getElementById("cell2") + .removeEventListener("click", function error() { + ogame1(); + }); + document + .getElementById("cell3") + .removeEventListener("click", function error() { + ogame1(); + }); + document + .getElementById("cell4") + .removeEventListener("click", function error() { + ogame1(); + }); + document + .getElementById("cell5") + .removeEventListener("click", function error() { + ogame1(); + }); + document + .getElementById("cell6") + .removeEventListener("click", function error() { + ogame1(); + }); + document + .getElementById("cell7") + .removeEventListener("click", function error() { + ogame1(); + }); + document + .getElementById("cell8") + .removeEventListener("click", function error() { + ogame1(); + }); + document + .getElementById("cell9") + .removeEventListener("click", function error() { + ogame1(); + }); + + document + .getElementById("cell1") + .removeEventListener("click", function error() { + ogame(); + }); + document + .getElementById("cell2") + .removeEventListener("click", function error() { + ogame(); + }); + document + .getElementById("cell3") + .removeEventListener("click", function error() { + ogame(); + }); + document + .getElementById("cell4") + .removeEventListener("click", function error() { + ogame(); + }); + document + .getElementById("cell5") + .removeEventListener("click", function error() { + ogame(); + }); + document + .getElementById("cell6") + .removeEventListener("click", function error() { + ogame(); + }); + document + .getElementById("cell7") + .removeEventListener("click", function error() { + ogame(); + }); + document + .getElementById("cell8") + .removeEventListener("click", function error() { + ogame(); + }); + document + .getElementById("cell9") + .removeEventListener("click", function error() { + ogame(); + }); } -} -function removeevent(){ -document.getElementById("cell1").removeEventListener("click", function error(){;ogame4();}) -document.getElementById("cell2").removeEventListener("click", function error(){;ogame4();}) -document.getElementById("cell3").removeEventListener("click", function error(){;ogame4();}) -document.getElementById("cell4").removeEventListener("click", function error(){;ogame4();}) -document.getElementById("cell5").removeEventListener("click", function error(){;ogame4();}) -document.getElementById("cell6").removeEventListener("click", function error(){;ogame4();}) -document.getElementById("cell7").removeEventListener("click", function error(){;ogame4();}) -document.getElementById("cell8").removeEventListener("click", function error(){;ogame4();}) -document.getElementById("cell9").removeEventListener("click", function error(){;ogame4();}) - -document.getElementById("cell1").removeEventListener("click", function error(){;ogame3();}) -document.getElementById("cell2").removeEventListener("click", function error(){;ogame3();}) -document.getElementById("cell3").removeEventListener("click", function error(){;ogame3();}) -document.getElementById("cell4").removeEventListener("click", function error(){;ogame3();}) -document.getElementById("cell5").removeEventListener("click", function error(){;ogame3();}) -document.getElementById("cell6").removeEventListener("click", function error(){;ogame3();}) -document.getElementById("cell7").removeEventListener("click", function error(){;ogame3();}) -document.getElementById("cell8").removeEventListener("click", function error(){;ogame3();}) -document.getElementById("cell9").removeEventListener("click", function error(){;ogame3();}) - -document.getElementById("cell1").removeEventListener("click", function error(){;ogame2();}) -document.getElementById("cell2").removeEventListener("click", function error(){;ogame2();}) -document.getElementById("cell3").removeEventListener("click", function error(){;ogame2();}) -document.getElementById("cell4").removeEventListener("click", function error(){;ogame2();}) -document.getElementById("cell5").removeEventListener("click", function error(){;ogame2();}) -document.getElementById("cell6").removeEventListener("click", function error(){;ogame2();}) -document.getElementById("cell7").removeEventListener("click", function error(){;ogame2();}) -document.getElementById("cell8").removeEventListener("click", function error(){;ogame2();}) -document.getElementById("cell9").removeEventListener("click", function error(){;ogame2();}) - -document.getElementById("cell1").removeEventListener("click", function error(){;ogame1();}) -document.getElementById("cell2").removeEventListener("click", function error(){;ogame1();}) -document.getElementById("cell3").removeEventListener("click", function error(){;ogame1();}) -document.getElementById("cell4").removeEventListener("click", function error(){;ogame1();}) -document.getElementById("cell5").removeEventListener("click", function error(){;ogame1();}) -document.getElementById("cell6").removeEventListener("click", function error(){;ogame1();}) -document.getElementById("cell7").removeEventListener("click", function error(){;ogame1();}) -document.getElementById("cell8").removeEventListener("click", function error(){;ogame1();}) -document.getElementById("cell9").removeEventListener("click", function error(){;ogame1();}) - -document.getElementById("cell1").removeEventListener("click", function error(){;ogame();}) -document.getElementById("cell2").removeEventListener("click", function error(){;ogame();}) -document.getElementById("cell3").removeEventListener("click", function error(){;ogame();}) -document.getElementById("cell4").removeEventListener("click", function error(){;ogame();}) -document.getElementById("cell5").removeEventListener("click", function error(){;ogame();}) -document.getElementById("cell6").removeEventListener("click", function error(){;ogame();}) -document.getElementById("cell7").removeEventListener("click", function error(){;ogame();}) -document.getElementById("cell8").removeEventListener("click", function error(){;ogame();}) -document.getElementById("cell9").removeEventListener("click", function error(){;ogame();}) -} \ No newline at end of file diff --git a/tictac/tictac.png b/tictac/tictac.png old mode 100644 new mode 100755 diff --git a/tictac/tictacold.html b/tictac/tictacold.html old mode 100644 new mode 100755 diff --git a/yatzee/dice/die1.gif b/yatzee/dice/die1.gif old mode 100644 new mode 100755 diff --git a/yatzee/dice/die1.png b/yatzee/dice/die1.png old mode 100644 new mode 100755 diff --git a/yatzee/dice/die2.gif b/yatzee/dice/die2.gif old mode 100644 new mode 100755 diff --git a/yatzee/dice/die2.png b/yatzee/dice/die2.png old mode 100644 new mode 100755 diff --git a/yatzee/dice/die3.gif b/yatzee/dice/die3.gif old mode 100644 new mode 100755 diff --git a/yatzee/dice/die3.png b/yatzee/dice/die3.png old mode 100644 new mode 100755 diff --git a/yatzee/dice/die4.gif b/yatzee/dice/die4.gif old mode 100644 new mode 100755 diff --git a/yatzee/dice/die4.png b/yatzee/dice/die4.png old mode 100644 new mode 100755 diff --git a/yatzee/dice/die5.gif b/yatzee/dice/die5.gif old mode 100644 new mode 100755 diff --git a/yatzee/dice/die5.png b/yatzee/dice/die5.png old mode 100644 new mode 100755 diff --git a/yatzee/dice/die6.gif b/yatzee/dice/die6.gif old mode 100644 new mode 100755 diff --git a/yatzee/dice/die6.png b/yatzee/dice/die6.png old mode 100644 new mode 100755 diff --git a/yatzee/index.html b/yatzee/index.html old mode 100644 new mode 100755 diff --git a/yatzee/new.html b/yatzee/new.html old mode 100644 new mode 100755 diff --git a/yatzee/script.js b/yatzee/script.js old mode 100644 new mode 100755 diff --git a/yatzee/style.css b/yatzee/style.css old mode 100644 new mode 100755 diff --git a/yatzee/yatzee.css b/yatzee/yatzee.css old mode 100644 new mode 100755 diff --git a/yatzee/yatzee.js b/yatzee/yatzee.js old mode 100644 new mode 100755 diff --git a/yatzee/yatzee.php b/yatzee/yatzee.php old mode 100644 new mode 100755 diff --git a/youtube/.htaccess b/youtube/.htaccess old mode 100644 new mode 100755 diff --git a/youtube/log b/youtube/log old mode 100644 new mode 100755 diff --git a/youtube1.php b/youtube1.php old mode 100644 new mode 100755 diff --git a/youtube_convert/index.php b/youtube_convert/index.php old mode 100644 new mode 100755 diff --git a/youtube_convert/youtube.sh b/youtube_convert/youtube.sh old mode 100644 new mode 100755 diff --git a/zzpowder/index.html b/zzpowder/index.html old mode 100644 new mode 100755 diff --git a/zzpowder/style.css b/zzpowder/style.css old mode 100644 new mode 100755