Coder Social home page Coder Social logo

hafta1-odev2-assignment-onurutku's Introduction

2-) Tic Tac Toe Uygulaması

3x3, 9 kutudan oluşan bir yapı tasarlanacak. Yatay, dikey veya çapraz bir şekilde x-x-x veya o-o-o 3lüsü oluşturan taraf kazanan oyuncu olacak. 3lü oluşmazsa oyun berabere sonuçlanacak. Oyun sonucu bir metin ile bildirilmeli. (html,css ve javascript kullanılarak yapılacak) (querySelector ile html elementlerine erişim sağlayabilirsiniz) (style, classList ile stillerle oynayabilirsiniz) (addEventListener ile kullanıcı etkileşimlerini yakalayabilirsiniz)

Cevap 2: Projeyi 4 ana başlıkta tamamladım.

1-değişkenleri tanımladım.

2-Bir IIFE function tanımlayıp kod ilk execute edildiğinde çalışmasını istediğim fonksiyonları ve tag'lere atanacak olan eventleri burada tanımladım.

3-prepareGame() adından bir fonsiyon tanımladım. Bu fonksiyon hem fsayfa ilk yüklendiğinde hem de oyun restart edildiğinde çalışıyor ve tüm eğişkenleri oyuna başlamaya hazır hale getirecek şekilde değiştiriyor.

4-putSign() adında bir fonksiyon tanımladım ve kutulara tıklandığında yani oyun oynanırken ne olacağını tüm eventleri burada tanımladım yani asıl işi yapan fonksiyon bu.

Ayrıntılı açıklama satırları kod içerisinde comment line olarak bulunmaktatır.

hafta1-odev2-assignment-onurutku's People

Contributors

onurutku avatar github-classroom[bot] avatar

Forkers

onurutku

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.